Core 1.0
|
A core axis class. More...
#include <axis.h>
Public Member Functions | |
Axis2 () | |
Empty. | |
Axis2 (const Vector2 &, const Vector2 &) | |
Creates an axis given end vertices. | |
~Axis2 () | |
Empty. | |
Vector2 | Vertex (int) const |
Return one of the end vertexes of the axis. | |
Vector2 | Point (const double &) const |
Compute a point on the axis. | |
Vector2 | GetAxis () const |
Returns the normalized axis vector. | |
constexpr double | Length () const |
Return the axis length. | |
void | Translate (const Vector2 &) |
Translation. | |
void | Rotate (const Matrix2 &) |
Rotation. | |
void | Scale (const double &) |
Scaling. | |
Vector2 | Symmetric (const Vector2 &) const |
Symmetric point. | |
Circle2 | Symmetric (const Circle2 &) const |
Symmetric circle. | |
Box2 | Symmetric (const Box2 &) const |
Symmetric box. | |
Protected Member Functions | |
double | Radial (const Vector2 &, Vector2 &, Vector2 &) const |
Compute the radial coordinates of a point. | |
Vector2 | Radial (const Vector2 &) const |
Compute the radial coordinates of a point. | |
Protected Attributes | |
Vector2 | b = Vector2(1.0, 0.0) |
End vertexes of the axis. | |
Vector2 | axis = Vector2::X |
Normalized axis vector. | |
double | length = 1.0 |
Length of the axis. | |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Axis2 &axis) |
Overloaded. | |
A core axis class.
Creates an axis given end vertices.
a,b | End vertices of the axis. |
Compute the radial coordinates of a point.
p | Point. |
Compute the radial coordinates of a point.
p | Point. |
av | Returned axis vector. |
rv | Returned radial vector. |
void Axis2::Rotate | ( | const Matrix2 & | r | ) |
Rotation.
r | Rotation matrix. |
void Axis2::Scale | ( | const double & | s | ) |
Scaling.
s | Scaling factor. |
Symmetric circle.
circle | The circle. |
void Axis2::Translate | ( | const Vector2 & | t | ) |
Translation.
t | Translation vector. |
|
friend |
Overloaded.
s | Stream. |
axis | The axis. |