Beispiel #1
0
bool Arc2D::isPointOnArcWithEqualQuadrant(const Point2D& firstPoint,
					  const Point2D& requestedPoint,
					  const bool& i_isClockwise) const {
  // it is in the same quadrant so we can do
  traceType firstPointAlpha(firstPoint.getAlpha());
  traceType requestedPointAlpha(requestedPoint.getAlpha());
  traceType spannedAngle(spanAngle());
  if (!i_isClockwise) {
    if (firstPointAlpha < requestedPointAlpha) {
      if ((firstPointAlpha + spannedAngle) > requestedPointAlpha) {
	return true;
      }
    }
  } else { // clockwise
    if (firstPointAlpha > requestedPointAlpha) {
      if ((firstPointAlpha - spannedAngle) < requestedPointAlpha) {
	return true;
      }
    }
  }
  return false;
}