Example #1
0
bool BasicMesh::intersects(BasicMesh& other)
{
	if (abs(getPosition().x - other.getPosition().x) < getScale().x + other.getScale().x)
	{
		if (abs(getPosition().y - other.getPosition().y) < getScale().y + other.getScale().y)
		{
			if (abs(getPosition().z - other.getPosition().z) < getScale().z + other.getScale().z)
			{
				return true;
			}
		}
	}
	return false;
}