Ejemplo n.º 1
0
bool PolyChecker::Intersect(const DPoint2 &a, const DPoint2 &b, const DPoint2 &c, const DPoint2 &d)
{
	if (IntersectProp(a, b, c, d))
		return true;
	else if (Between(a, b, c) || Between(a, b, d) ||
			 Between(c, d, a) || Between(c, d, b))
		return true;
	else
		return false;
}
Ejemplo n.º 2
0
/*---------------------------------------------------------------------
Returns TRUE iff segments ab and cd intersect, properly or improperly.
---------------------------------------------------------------------*/
bool	Intersect( tPointi a, tPointi b, tPointi c, tPointi d )
{
   if      ( IntersectProp( a, b, c, d ) )
      return  TRUE;
   else if (   Between( a, b, c )
            || Between( a, b, d )
            || Between( c, d, a )
            || Between( c, d, b )
           )
      return  TRUE;
   else    return  FALSE;
}