Exemple #1
0
bool Quad::CollidesWith (Triangle& other, Vector* vIntersection )
{
	// just do a line to quad check with all of the other triangle's lines
	if (other.CollidesWith (Line (v1,v2), vIntersection))
		return true;
	if (other.CollidesWith (Line (v2,v3), vIntersection))
		return true;
	if (other.CollidesWith (Line (v3,v4), vIntersection))
		return true;
	if (other.CollidesWith (Line (v4,v1), vIntersection))
		return true;

	return false;
}