Core 1.0
|
Solid transformations in the plane. More...
#include <frame.h>
Public Member Functions | |
Frame2 (const Matrix2 &=Matrix2::Identity, const Vector2 &=Vector2::Null) | |
Creates a frame given a rotation matrix and a translation vector. More... | |
Frame2 (const Vector2 &, const Vector2 &, const Vector2 &) | |
Creates a frame given the origin and its orthogonal unit vectors. More... | |
~Frame2 () | |
Empty. | |
Matrix2 | R () const |
Returns the rotation matrix of the frame. | |
Vector2 | T () const |
Returns the translation vector of the frame. | |
Vector2 | GetVector (int) const |
Returns the i-th basis vector of the frame. More... | |
void | Compose (const Frame2 &) |
Compose the frame with another one. More... | |
Frame2 | Composed (const Frame2 &) const |
Compose the frame with another one. More... | |
Frame2 | Inverse () const |
Compute the inverse transformation. | |
Vector2 | Transform (const Vector2 &) const |
Transform a point out of the frame coordinate system. More... | |
Vector2 | InverseTransform (const Vector2 &) const |
Transform a point into the frame coordinate system. More... | |
Vector2 | TransformDirection (const Vector2 &) const |
Transform a direction vector out of the frame coordinate system. More... | |
Vector2 | InverseTransformDirection (const Vector2 &) const |
Transform a direction vector into the frame coordinate system. | |
Static Public Member Functions | |
static Frame2 | Translation (const Vector2 &) |
Creates a translation transformation. More... | |
static Frame2 | Rotation (const double &) |
Create a rotation frame about an arbitrary axis. More... | |
Static Public Attributes | |
static const Frame2 | Id |
Identity. | |
Protected Attributes | |
Matrix2 | r |
Rotation matrix. | |
Vector2 | t |
Translation vector. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const Frame2 &) |
Overloaded. More... | |
Solid transformations in the plane.
|
explicit |
Creates a frame given a rotation matrix and a translation vector.
r | Frame matrix. |
t | Translation vector. |
Creates a frame given the origin and its orthogonal unit vectors.
c | Origin. |
x,y | Orthonormal vectors. |
void Frame2::Compose | ( | const Frame2 & | frame | ) |
Compose the frame with another one.
frame | The frame. |
Compose the frame with another one.
frame | The frame. |
|
inline |
Returns the i-th basis vector of the frame.
This is a convenience function, which is the same as:
i | Column index. |
Transform a point into the frame coordinate system.
p | Point. |
|
static |
Create a rotation frame about an arbitrary axis.
angle | Angle (should be in radian). |
Transform a point out of the frame coordinate system.
p | Point. |
Transform a direction vector out of the frame coordinate system.
n | Vector. |
Creates a translation transformation.
Matrix is identity whereas the translation vector is computed from the argument vector.
t | Translation vector. |
|
friend |
Overloaded.
s | Stream. |
frame | The frame. |