|
| Point2D () |
| A Point2D defaults to (0,0). More...
|
|
| Point2D (int _x, int _y) |
| Initialize a Point2D At (_x, _y). More...
|
|
| Point2D (const Polar2D &pol) |
| Initialize a Point2D from a Polar2D coordinate. More...
|
|
int | X () const |
| Return the X component of the point. More...
|
|
void | X (int _x) |
| Set the X component of the point. More...
|
|
int | Y () const |
| Return the Y component of the point. More...
|
|
void | Y (int _y) |
| Set the Y component of the point. More...
|
|
std::string | ToString () |
| ToString returns a string in the format (x,y). More...
|
|
void | ToPolar (Polar2D &) |
| ToPolar converts the Point2D to a polar coordinate in-place. More...
|
|
void | Rotate (Point2D &rotated, double theta) |
| Rotate rotates the point by theta radians. More...
|
|
std::vector< Point2D > | Rotate (std::vector< Polar2D > vertices, double theta) |
| Rotate this point around a series of vertices. More...
|
|
void | Translate (const Point2D &other, Point2D &translated) |
| Translate adds this point to the first argument, storing the result in the second argument. More...
|
|
int | Distance (const Point2D &other) const |
| Distance returns the distance from this point to another. More...
|
|
| Vector () |
| Construct a unit vector of a given type and size. More...
|
|
| Vector (std::initializer_list< int > ilst) |
| Construct a Vector with initial values. More...
|
|
int | At (size_t index) const |
| Return the element At index i. More...
|
|
void | Set (size_t index, int value) |
| Set a new value for the vector. More...
|
|
int | Magnitude () const |
| Compute the length of the vector. More...
|
|
void | SetEpsilon (int eps) |
| Set equivalence tolerance. More...
|
|
bool | IsZero () const |
| Determine whether this is a zero vector. More...
|
|
Vector | UnitVector () const |
| Obtain the unit vector for this vector. More...
|
|
bool | IsUnitVector () const |
| Determine if this is a unit vector. More...
|
|
int | Angle (const Vector< int, N > &other) const |
| Compute the Angle between two vectors. More...
|
|
bool | IsParallel (const Vector< int, N > &other) const |
| Determine whether two vectors are parallel. More...
|
|
bool | IsOrthogonal (const Vector< int, N > &other) const |
| Determine if two vectors are orthogonal or perpendicular to each other. More...
|
|
Vector | ProjectParallel (const Vector< int, N > &basis) const |
| Project this vector onto some basis vector. More...
|
|
Vector | ProjectOrthogonal (const Vector< int, N > &basis) |
| Project this vector perpendicularly onto some basis vector. More...
|
|
Vector | Cross (const Vector< int, N > &other) const |
| Compute the cross product of two vectors. More...
|
|
Vector | operator+ (const Vector< int, N > &other) const |
| Vector addition. More...
|
|
Vector | operator- (const Vector< int, N > &other) const |
| Vector subtraction. More...
|
|
Vector | operator* (const int k) const |
| Scalar multiplication. More...
|
|
int | operator* (const Vector< int, N > &other) const |
| Compute the Dot product between two vectors. More...
|
|
Vector | operator/ (const int k) const |
| Scalar division. More...
|
|
bool | operator== (const Vector< int, N > &other) const |
| Vector equivalence. More...
|
|
bool | operator!= (const Vector< int, N > &other) const |
| Vector non-equivalence. More...
|
|
const int & | operator[] (size_t i) const |
| Array indexing into vector. More...
|
|
Point2D is a cartesian (X,Y) pairing.