|
const double & | x () const |
|
const double & | y () const |
|
double & | x () |
|
double & | y () |
|
| Point (double x=0, double y=0) |
| sets the point to x,y More...
|
|
| Point (const Packet::Point &other) |
| Implicit constructor for creating a Point from a Packet::Point.
|
|
| Point (const QPointF &other) |
| Implicit constructor for creating a Point from a QPointF.
|
|
| Point (const QPoint &other) |
| Implicit constructor for creating a Point from a QPoint.
|
|
| Point (const double *other) |
| Implicit constructor for creating a Point from a double*.
|
|
| Point (const Eigen::Vector2d &other) |
| Implicit conversion from Eigen::Vector2d.
|
|
| operator Eigen::Vector2d () const |
| Implicit conversion to Eigen::Vector2d.
|
|
QPointF | toQPointF () const |
| to draw stuff and interface with QT
|
|
| operator Packet::Point () const |
|
Point | operator+ (Point other) const |
| does vector addition adds the + operator, shorthand
|
|
Point | operator/ (Point other) const |
| see operator+ does vector division, note the operator
|
|
Point | operator* (Point other) const |
|
Point | operator- (Point other) const |
| see operator+ does vector subtraction, note the operator without parameter, it is the negative
|
|
Point | operator- () const |
| multiplies the point by a -1 vector
|
|
Point & | operator+= (Point other) |
| see operator+ this modifies the value instead of returning a new value
|
|
Point & | operator-= (Point other) |
| see operator- this modifies the value instead of returning a new value
|
|
Point & | operator*= (double s) |
| see operator* this modifies the value instead of returning a new value
|
|
Point & | operator/= (double s) |
| see operator/ this modifies the value instead of returning a new value
|
|
Point | operator/ (double s) const |
| adds the / operator for vectors scalar division
|
|
Point | operator* (double s) const |
| adds the * operator for vectors scalar multiplication
|
|
bool | operator== (Point other) const |
| compares two points to see if both x and y are the same adds the == operator
|
|
bool | operator!= (Point other) const |
| this is the negation of operator operator !=
|
|
const double & | operator[] (int i) const |
|
double & | operator[] (int i) |
|
double | dot (Point p) const |
| computes the dot product of this point and another. More...
|
|
double | mag () const |
| computes the magnitude of the point, as if it were a vector More...
|
|
double | magsq () const |
| computes magnitude squared this is faster than mag() More...
|
|
Point & | clamp (double max) |
| Restricts the point to a given magnitude. More...
|
|
Point & | rotate (const Point &origin, double angle) |
| rotates the point around another point by specified angle in the CCW direction More...
|
|
Point & | rotate (double angle) |
| rotates the point around the origin
|
|
Point | rotated (double angle) const |
| Like rotate(), but returns a new point instead of changing *this.
|
|
Point | rotated (const Point &origin, double angle) const |
| Returns a new Point rotated around the origin.
|
|
double | distTo (const Point &other) const |
| computes the distance from the current point to another More...
|
|
Point | normalized (double magnitude=1.0) const |
| Returns a vector with the same direction as this vector but with magnitude given, unless this vector is zero. More...
|
|
Point | norm () const |
| Alias for normalized() - matches Eigen's syntax.
|
|
bool | nearPoint (const Point &other, double threshold) const |
| Returns true if this point is within the given distance (threshold) of (pt)
|
|
double | angle () const |
| Returns the angle of this point in radians CCW from +X.
|
|
Point | perpCW () const |
| returns the perpendicular to the point, Clockwise
|
|
Point | perpCCW () const |
| returns the perpendicular to the point, Counter Clockwise
|
|
double | angleTo (const Point &other) const |
|
double | cross (const Point &other) const |
|
double | angleBetween (const Point &other) const |
| returns the angle between the two normalized points (radians)
|
|
bool | nearlyEquals (Point other) const |
|
std::string | toString () const |
|
Simple class to represent a point in 2d space.
Uses floating point coordinates