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. | |
Frame2 (const double &, const Vector2 &=Vector2::Null) | |
Creates a frame given a rotation angle and a translation vector. | |
Frame2 (const Vector2 &, const Vector2 &) | |
Creates a frame given the origin and its orthogonal unit vectors. | |
~Frame2 () | |
Empty. | |
Matrix2 | R () const |
Returns the rotation matrix of the frame. | |
Vector2 | T () const |
Returns the translation vector of the frame. | |
void | Compose (const Frame2 &) |
Compose the frame with another one. | |
Frame2 | Composed (const Frame2 &) const |
Compose the frame with another one. | |
Frame2 | Inverse () const |
Compute the inverse transformation. | |
Vector2 | Transform (const Vector2 &) const |
Transform a point out of the frame coordinate system. | |
Vector2 | InverseTransform (const Vector2 &) const |
Transform a point into the frame coordinate system. | |
Vector2 | TransformDirection (const Vector2 &) const |
Transform a direction vector out of the frame coordinate system. | |
Vector2 | InverseTransformDirection (const Vector2 &) const |
Transform a direction vector into the frame coordinate system. | |
void | Draw (QGraphicsScene &, const QPen &) const |
Draw a circle. | |
Static Public Member Functions | |
static Frame2 | Translation (const Vector2 &) |
Creates a translation transformation. | |
static Frame2 | Rotation (const double &) |
Create a rotation frame. | |
Static Public Attributes | |
static const Frame2 | Id |
Identity. | |
Protected Attributes | |
Matrix2 | r |
Rotation matrix. | |
Vector2 | t |
Translation vector. | |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Frame2 &frame) |
Overloaded. | |
Solid transformations in the plane.
Frame2::Frame2 | ( | const Matrix2 & | r = Matrix2::Identity, |
const Vector2 & | t = Vector2::Null ) |
Creates a frame given a rotation matrix and a translation vector.
r | Frame matrix. |
t | Translation vector. |
|
explicit |
Creates a frame given a rotation angle and a translation vector.
a | Angle. |
t | Translation vector. |
Creates a frame given the origin and its orthogonal unit vectors.
c | Origin. |
x | Axis, the orthonormal vectors will be set as (x,x⟂). |
void Frame2::Compose | ( | const Frame2 & | frame | ) |
Compose the frame with another one.
frame | The frame. |
Compose the frame with another one.
frame | The frame. |
void Frame2::Draw | ( | QGraphicsScene & | scene, |
const QPen & | pen ) const |
Draw a circle.
scene | Graphics scene. |
pen | The pen. |
Transform a point into the frame coordinate system.
p | Point. |
|
static |
Create a rotation frame.
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. |