|
| Polar2D () |
| Construct a zero polar coordinate.
|
|
| Polar2D (double _r, double _theta) |
| Construct a polar coordinate from a radius and angle.
|
|
| Polar2D (const Point2D &point) |
| Construct a polar coordinate from a point.
|
|
double | R () const |
| Return the radius component of this coordinate.
|
|
void | R (const double _r) |
| Set the radius component of this coordinate.
|
|
double | Theta () const |
| Return the angle component of this coordinate.
|
|
void | Theta (const double _theta) |
| Set the angle component of this coordinate.
|
|
std::string | ToString () |
| Return the coordinate in string form.
|
|
void | ToPoint (Point2D &point) |
| Construct a Point2D representing this Polar2D.
|
|
void | Rotate (Polar2D &rotated, double delta) |
| Rotate polar coordinate by some angle.
|
|
void | RotateAround (const Point2D &other, Point2D &result, double delta) |
| Rotate this polar coordinate around a 2D point.
|
|
| Vector () |
| Construct a unit vector of a given type and size.
|
|
| Vector (std::initializer_list< double > ilst) |
| Construct a Vector with initial values.
|
|
double | At (size_t index) const |
| Return the element At index i.
|
|
void | Set (size_t index, double value) |
| Set a new value for the vector.
|
|
double | Magnitude () const |
| Compute the length of the vector.
|
|
void | SetEpsilon (double eps) |
| Set equivalence tolerance.
|
|
bool | IsZero () const |
| Determine whether this is a zero vector.
|
|
Vector | UnitVector () const |
| Obtain the unit vector for this vector.
|
|
bool | IsUnitVector () const |
| Determine if this is a unit vector.
|
|
double | Angle (const Vector< double, N > &other) const |
| Compute the Angle between two vectors.
|
|
bool | IsParallel (const Vector< double, N > &other) const |
| Determine whether two vectors are parallel.
|
|
bool | IsOrthogonal (const Vector< double, N > &other) const |
| Determine if two vectors are orthogonal or perpendicular to each other.
|
|
Vector | ProjectParallel (const Vector< double, N > &basis) const |
| Project this vector onto some basis vector.
|
|
Vector | ProjectOrthogonal (const Vector< double, N > &basis) |
| Project this vector perpendicularly onto some basis vector.
|
|
Vector | Cross (const Vector< double, N > &other) const |
| Compute the cross product of two vectors.
|
|
Vector | operator+ (const Vector< double, N > &other) const |
| Vector addition.
|
|
Vector | operator- (const Vector< double, N > &other) const |
| Vector subtraction.
|
|
Vector | operator* (const double k) const |
| Scalar multiplication.
|
|
double | operator* (const Vector< double, N > &other) const |
| Compute the Dot product between two vectors.
|
|
Vector | operator/ (const double k) const |
| Scalar division.
|
|
bool | operator== (const Vector< double, N > &other) const |
| Vector equivalence.
|
|
bool | operator!= (const Vector< double, N > &other) const |
| Vector non-equivalence.
|
|
const double & | operator[] (size_t i) const |
| Array indexing into vector.
|
|
Polar2D is a pairing of a radius r and angle θ from some reference point; in this library, it is assumed to be the Cartesian origin (0, 0).