|
| | Point () |
| | Point (float x, float y) |
| | Point ( local x, local y) |
| | Point (const Point &other) |
| | Point (const Size &size) |
| Point & | operator= (const Point &other) |
| Point & | operator= (const Size &size) |
| Point | operator+ (const Point &right) const |
| Point | operator- (const Point &right) const |
| Point | operator- () const |
| Point | operator* (float a) const |
| Point | operator/ (float a) const |
| void | setPoint (float x, float y) |
| bool | equals (const Point &target) const |
| bool | fuzzyEquals (const Point &target, float variance) const |
| float | getLength () const |
| | Calculates distance between point an origin. More...
|
| |
| float | getLengthSq () const |
| | Calculates the square length of a Point (not calling sqrt() ) More...
|
| |
| float | getDistanceSq (const Point &other) const |
| | Calculates the square distance between two points (not calling sqrt() ) More...
|
| |
| float | getDistance (const Point &other) const |
| | Calculates the distance between two points. More...
|
| |
| float | getAngle () const |
| float | getAngle (const Point &other) const |
| float | dot (const Point &other) const |
| | Calculates dot product of two points. More...
|
| |
| float | cross (const Point &other) const |
| | Calculates cross product of two points. More...
|
| |
| Point | getPerp () const |
| | Calculates perpendicular of v, rotated 90 degrees counter-clockwise – cross(v, perp(v)) >= 0. More...
|
| |
| Point | getMidpoint (const Point &other) const |
| | Calculates midpoint between two points. More...
|
| |
| Point | getClampPoint (const Point &min_inclusive, const Point &max_inclusive) const |
| | Clamp a point between from and to. More...
|
| |
| Point | compOp (std::function< float(float)> function) const |
| | Run a math operation function on each point component absf, fllorf, ceilf, roundf any function that has the signature: float func(float); For example: let's try to take the floor of x,y p.compOp(floorf);. More...
|
| |
| Point | getRPerp () const |
| | Calculates perpendicular of v, rotated 90 degrees clockwise – cross(v, rperp(v)) <= 0. More...
|
| |
| Point | project (const Point &other) const |
| | Calculates the projection of this over other. More...
|
| |
| Point | rotate (const Point &other) const |
| | Complex multiplication of two points ("rotates" two points). More...
|
| |
| Point | unrotate (const Point &other) const |
| | Unrotates two points. More...
|
| |
| Point | normalize () const |
| | Returns point multiplied to a length of 1. More...
|
| |
| Point | lerp (const Point &other, float alpha) const |
| | Linear Interpolation between two points a and b. More...
|
| |
| Point | rotateByAngle (const Point &pivot, float angle) const |
| | Rotates a point counter clockwise by the angle around a pivot. More...
|
| |
|
| static Point | forAngle (const float a) |
| static bool | isLineIntersect (const Point &A, const Point &B, const Point &C, const Point &D, float *S=nullptr, float *T=nullptr) |
| | A general line-line intersection test. More...
|
| |
| static bool | isLineOverlap (const Point &A, const Point &B, const Point &C, const Point &D) |
| | returns true if Line A-B overlap with segment C-D More...
|
| |
| static bool | isLineParallel (const Point &A, const Point &B, const Point &C, const Point &D) |
| | returns true if Line A-B parallel with segment C-D More...
|
| |
| static bool | isSegmentOverlap (const Point &A, const Point &B, const Point &C, const Point &D, Point *S=nullptr, Point *E=nullptr) |
| | returns true if Segment A-B overlap with segment C-D More...
|
| |
| static bool | isSegmentIntersect (const Point &A, const Point &B, const Point &C, const Point &D) |
| | returns true if Segment A-B intersects with segment C-D More...
|
| |
| static Point | getIntersectPoint (const Point &A, const Point &B, const Point &C, const Point &D) |
| | returns the intersection point of line A-B, C-D More...
|
| |