25#ifndef SCMATH_GEOM_COORD2D_H
26#define SCMATH_GEOM_COORD2D_H
Linear algebraic vector class.
Point2D is a cartesian (X,Y) pairing.
Definition Coord2D.h:45
void ToPolar(Polar2D &)
ToPolar converts the Point2D to a polar coordinate in-place.
void Rotate(Point2D &rotated, double theta)
Rotate rotates the point by theta radians.
Point2D()
A Point2D defaults to (0,0).
Point2D(int _x, int _y)
Initialize a Point2D At (_x, _y).
int Distance(const Point2D &other) const
Distance returns the distance from this point to another.
std::string ToString()
ToString returns a string in the format (x,y).
int Y() const
Return the Y component of the point.
void Translate(const Point2D &other, Point2D &translated)
Translate adds this point to the first argument, storing the result in the second argument.
void X(int _x)
Set the X component of the point.
void Y(int _y)
Set the Y component of the point.
Point2D(const Polar2D &pol)
Initialize a Point2D from a Polar2D coordinate.
friend std::ostream & operator<<(std::ostream &outs, const Point2D &pt)
std::vector< Point2D > Rotate(std::vector< Polar2D > vertices, double theta)
Rotate this point around a series of vertices.
int X() const
Return the X component of the point.
Polar2D is a pairing of a radius r and angle θ from some reference point; in this library,...
Definition Coord2D.h:104
double Theta() const
Return the angle component of this coordinate.
friend std::ostream & operator<<(std::ostream &, const Polar2D &)
double R() const
Return the radius component of this coordinate.
void Theta(const double _theta)
Set the angle component of this coordinate.
Polar2D(double _r, double _theta)
Construct a polar coordinate from a radius and angle.
void RotateAround(const Point2D &other, Point2D &result, double delta)
Rotate this polar coordinate around a 2D point.
Polar2D(const Point2D &point)
Construct a polar coordinate from a point.
void R(const double _r)
Set the radius component of this coordinate.
void ToPoint(Point2D &point)
Construct a Point2D representing this Polar2D.
Polar2D()
Construct a zero polar coordinate.
std::string ToString()
Return the coordinate in string form.
void Rotate(Polar2D &rotated, double delta)
Rotate polar coordinate by some angle.
Vectors represent a direction and Magnitude.
Definition Vector.h:57
Quaternionf MakeQuaternion(Vector3F axis, float angle)
Convenience Quaternion construction function.
Shimmering Clarity Math & Physics toolkit.
Definition estimation.h:31