|
bool | IsPointOnSegment (const wxPoint &aSegStart, const wxPoint &aSegEnd, const wxPoint &aTestPoint) |
| Test if aTestPoint is on line defined by aSegStart and aSegEnd.
|
|
bool | SegmentIntersectsSegment (const wxPoint &a_p1_l1, const wxPoint &a_p2_l1, const wxPoint &a_p1_l2, const wxPoint &a_p2_l2, wxPoint *aIntersectionPoint=nullptr) |
| Test if two lines intersect.
|
|
void | RotatePoint (int *pX, int *pY, double angle) |
|
void | RotatePoint (int *pX, int *pY, int cx, int cy, double angle) |
|
void | RotatePoint (wxPoint *point, double angle) |
|
void | RotatePoint (VECTOR2I &point, double angle) |
|
void | RotatePoint (VECTOR2I &point, const VECTOR2I ¢re, double angle) |
|
void | RotatePoint (wxPoint *point, const wxPoint ¢re, double angle) |
|
void | RotatePoint (double *pX, double *pY, double angle) |
|
void | RotatePoint (double *pX, double *pY, double cx, double cy, double angle) |
|
const VECTOR2I | CalcArcCenter (const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd) |
| Determine the center of an arc or circle given three points on its circumference.
|
|
const VECTOR2D | CalcArcCenter (const VECTOR2D &aStart, const VECTOR2D &aMid, const VECTOR2D &aEnd) |
|
const wxPoint | CalcArcCenter (const wxPoint &aStart, const wxPoint &aMid, const wxPoint &aEnd) |
|
const wxPoint | CalcArcCenter (const VECTOR2I &aStart, const VECTOR2I &aEnd, double aAngle) |
|
double | CalcArcAngle (const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd) |
| Return the subtended angle for a given arc.
|
|
const VECTOR2I | CalcArcMid (const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, bool aMinArcAngle=true) |
| Return the middle point of an arc, half-way between aStart and aEnd.
|
|
double | ArcTangente (int dy, int dx) |
|
double | EuclideanNorm (const wxPoint &vector) |
| Euclidean norm of a 2D vector.
|
|
double | EuclideanNorm (const wxSize &vector) |
|
double | DistanceLinePoint (const wxPoint &linePointA, const wxPoint &linePointB, const wxPoint &referencePoint) |
| Compute the distance between a line and a reference point Reference: http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html.
|
|
bool | HitTestPoints (const wxPoint &pointA, const wxPoint &pointB, double threshold) |
| Test, if two points are near each other.
|
|
double | CrossProduct (const wxPoint &vectorA, const wxPoint &vectorB) |
| Determine the cross product.
|
|
bool | TestSegmentHit (const wxPoint &aRefPoint, const wxPoint &aStart, const wxPoint &aEnd, int aDist) |
| Test if aRefPoint is with aDistance on the line defined by aStart and aEnd.
|
|
double | GetLineLength (const wxPoint &aPointA, const wxPoint &aPointB) |
| Return the length of a line segment defined by aPointA and aPointB.
|
|
double | DEG2RAD (double deg) |
|
double | RAD2DEG (double rad) |
|
double | DECIDEG2RAD (double deg) |
|
double | RAD2DECIDEG (double rad) |
|
template<class T > |
T | NormalizeAngle360Max (T Angle) |
| Normalize angle to be >=-360.0 and <= 360.0 Angle can be equal to -360 or +360.
|
|
template<class T > |
T | NormalizeAngle360Min (T Angle) |
| Normalize angle to be > -360.0 and < 360.0 Angle equal to -360 or +360 are set to 0.
|
|
template<class T > |
T | NormalizeAngleNeg (T Angle) |
| Normalize angle to be in the 0.0 .. -360.0 range: angle is in 1/10 degrees.
|
|
template<class T > |
T | NormalizeAnglePos (T Angle) |
| Normalize angle to be in the 0.0 .. 360.0 range: angle is in 1/10 degrees.
|
|
template<class T > |
void | NORMALIZE_ANGLE_POS (T &Angle) |
|
double | NormalizeAngleDegreesPos (double Angle) |
| Normalize angle to be in the 0.0 .. 360.0 range: angle is in degrees.
|
|
void | NORMALIZE_ANGLE_DEGREES_POS (double &Angle) |
|
double | NormalizeAngleRadiansPos (double Angle) |
|
double | NormalizeAngleDegrees (double Angle, double aMin, double aMax) |
| Normalize angle to be aMin < angle <= aMax angle is in degrees.
|
|
template<class T , class T2 > |
T | AddAngles (T a1, T2 a2) |
| Add two angles (keeping the result normalized). T2 is here.
|
|
template<class T > |
T | NegateAndNormalizeAnglePos (T Angle) |
|
template<class T > |
void | NEGATE_AND_NORMALIZE_ANGLE_POS (T &Angle) |
|
template<class T > |
T | NormalizeAngle90 (T Angle) |
| Normalize angle to be in the -90.0 .. 90.0 range.
|
|
template<class T > |
void | NORMALIZE_ANGLE_90 (T &Angle) |
|
template<class T > |
T | NormalizeAngle180 (T Angle) |
| Normalize angle to be in the -180.0 .. 180.0 range.
|
|
template<class T > |
void | NORMALIZE_ANGLE_180 (T &Angle) |
|
bool | InterceptsPositiveX (double aStartAngle, double aEndAngle) |
| Test if an arc from aStartAngle to aEndAngle crosses the positive X axis (0 degrees).
|
|
bool | InterceptsNegativeX (double aStartAngle, double aEndAngle) |
| Test if an arc from aStartAngle to aEndAngle crosses the negative X axis (180 degrees).
|
|
double | sindecideg (double r, double a) |
| Circle generation utility: computes r * sin(a) Where a is in decidegrees, not in radians.
|
|
double | cosdecideg (double r, double a) |
| Circle generation utility: computes r * cos(a) Where a is in decidegrees, not in radians.
|
|