Construction helpers for the interactive arc drawing modes.
ARC_SOLUTION ArcFromStartEndCenterDrag(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCursor, bool aMajor)
Arc from aStart to aEnd centered on aCursor projected onto the chord bisector.
VECTOR2I ProjectToChordBisector(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCursor)
Project aCursor onto the perpendicular bisector of the chord aStart - aEnd.
ARC_SOLUTION ArcFromStartTangentEnd(const VECTOR2I &aStart, const VECTOR2D &aTangent, const VECTOR2I &aEnd)
Arc leaving aStart along aTangent and ending at aEnd.
ARC_SOLUTION ArcFromStartEndMidDrag(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCursor)
Arc from aStart to aEnd whose midpoint is aCursor projected onto the chord bisector.
ARC_SOLUTION ArcThroughPoints(const VECTOR2I &aStart, const VECTOR2I &aOnArc, const VECTOR2I &aEnd)
Arc from aStart to aEnd that passes through aOnArc.
bool valid
False for degenerate input (collinear points, zero chord, etc)
VECTOR2I mid
The point on the arc halfway along the sweep.
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D