Jpp test-rotations-old
the software that should make you happy
|
Transformation. More...
#include <JTransformation3D.hh>
Public Member Functions | |
JTransformation3D (const JPosition3D &pos, const JDirection3D &dir) | |
Constructor. | |
JPosition3D | transform (const JPosition3D &pos) const |
Transform position. | |
JPosition3D | transform_back (const JPosition3D &pos) const |
Transform back position. | |
const JPosition3D & | getPosition () const |
Get position. | |
JPosition3D & | getPosition () |
Get position. | |
void | setPosition (const JVector3D &pos) |
Set position. | |
operator JAngle3D () const | |
Type conversion operator. | |
operator JVersor3D () const | |
Type conversion operator. | |
JPosition3D & | rotate (const JRotation3D &R) |
Rotate. | |
JPosition3D & | rotate (const JRotation3X &R) |
Rotate around X-axis. | |
JPosition3D & | rotate (const JRotation3Y &R) |
Rotate around Y-axis. | |
JPosition3D & | rotate (const JRotation3Z &R) |
Rotate around Z-axis. | |
JPosition3D & | rotate (const JQuaternion3D &Q) |
Rotate. | |
JPosition3D & | rotate_back (const JRotation3D &R) |
Rotate back. | |
JPosition3D & | rotate_back (const JRotation3X &R) |
Rotate back around X-axis. | |
JPosition3D & | rotate_back (const JRotation3Y &R) |
Rotate back around Y-axis. | |
JPosition3D & | rotate_back (const JRotation3Z &R) |
Rotate back around Z-axis. | |
JPosition3D & | rotate_back (const JQuaternion3D &Q) |
Rotate back. | |
void | transform (const JRotation3D &R, const JVector3D &pos) |
Transform position. | |
JVector3D & | transform (const JMatrix3D &T) |
Transform. | |
void | transform_back (const JRotation3D &R, const JVector3D &pos) |
Transform back position. | |
double | getDot (const JAngle3D &angle) const |
Get dot product. | |
double | getDot (const JVersor3D &dir) const |
Get dot product. | |
double | getDot (const JVersor3Z &dir) const |
Get dot product. | |
double | getDot (const JVector3D &vector) const |
Get dot product. | |
operator JVector2D () const | |
Type conversion operator. | |
double | getX () const |
Get x position. | |
double | getY () const |
Get y position. | |
double | getZ () const |
Get z position. | |
JVector3D & | negate () |
Negate vector. | |
JVector3D & | add (const JVector3D &vector) |
Add vector. | |
JVector3D & | sub (const JVector3D &vector) |
Subtract vector. | |
JVector3D & | mul (const double factor) |
Scale vector. | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. | |
JVector3D & | div (const double factor) |
Scale vector. | |
bool | equals (const JVector3D &vector, const double precision=std::numeric_limits< double >::min()) const |
Check equality. | |
double | getLengthSquared () const |
Get length squared. | |
double | getLength () const |
Get length. | |
double | getDistanceSquared (const JVector3D &pos) const |
Get squared of distance to point. | |
double | getDistance (const JVector3D &pos) const |
Get distance to point. | |
JVector3D & | getCross (const JVector3D &first, const JVector3D &second) |
Get cross product. | |
const JRotation3D & | getRotation () const |
Get rotation. | |
operator JQuaternion3D () const | |
Type conversion operator. | |
JRotation3D & | transpose () |
Transpose. | |
JRotation3D & | mul (const JRotation3D &A, const JRotation3D &B) |
Matrix multiplication. | |
JMatrix3D & | mul (const double factor) |
Scale matrix. | |
JMatrix3D & | mul (const JMatrix3D &A, const JMatrix3D &B) |
Matrix multiplication. | |
JMatrix3D & | mul (const JSecond_t &object) |
Multiply with object. | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. | |
void | rotate (double &__x, double &__y, double &__z) const |
Rotate. | |
void | rotate_back (double &__x, double &__y, double &__z) const |
Rotate back. | |
JMatrix3D & | setIdentity () |
Set to identity matrix. | |
void | set (const JMatrix3D &A) |
Set matrix. | |
JMatrix3D & | reset () |
Set matrix to the null matrix. | |
JMatrix3D & | negate () |
Negate matrix. | |
JMatrix3D & | add (const JMatrix3D &A) |
Matrix addition. | |
JMatrix3D & | sub (const JMatrix3D &A) |
Matrix subtraction. | |
JMatrix3D & | div (const double factor) |
Scale matrix. | |
bool | equals (const JMatrix3D &A, const double eps=std::numeric_limits< double >::min()) const |
Equality. | |
bool | isIdentity (const double eps=std::numeric_limits< double >::min()) const |
Test identity. | |
double | getDeterminant () const |
Get determinant of matrix. | |
void | transform (double &__x, double &__y, double &__z) const |
Transform. | |
Static Public Member Functions | |
static const JMatrix3D & | getInstance () |
Get reference to unique instance of this class object. | |
static const JMatrix3D & | getIdentity () |
Get reference to unique instance of this class object. | |
Public Attributes | |
double | a00 |
double | a01 |
double | a02 |
double | a10 |
double | a11 |
double | a12 |
double | a20 |
double | a21 |
double | a22 |
Protected Attributes | |
double | __x |
double | __y |
double | __z |
Transformation.
This class defines the transformation of the coordinate system such that the z-axis is along the given direction with the origin at the given position.
Definition at line 24 of file JTransformation3D.hh.
|
inline |
Constructor.
pos | position |
dir | direction |
Definition at line 34 of file JTransformation3D.hh.
|
inline |
Transform position.
pos | position |
Definition at line 49 of file JTransformation3D.hh.
|
inline |
Transform back position.
pos | position |
Definition at line 65 of file JTransformation3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Rotate.
R | rotation matrix |
Definition at line 186 of file JPosition3D.hh.
|
inlineinherited |
Rotate around X-axis.
R | rotation matrix |
Definition at line 214 of file JPosition3D.hh.
|
inlineinherited |
Rotate around Y-axis.
R | rotation matrix |
Definition at line 242 of file JPosition3D.hh.
|
inlineinherited |
Rotate around Z-axis.
R | rotation matrix |
Definition at line 270 of file JPosition3D.hh.
|
inlineinherited |
|
inlineinherited |
Rotate back.
R | rotation matrix |
Definition at line 200 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around X-axis.
R | rotation matrix |
Definition at line 228 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around Y-axis.
R | rotation matrix |
Definition at line 256 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around Z-axis.
R | rotation matrix |
Definition at line 284 of file JPosition3D.hh.
|
inlineinherited |
Rotate back.
Q | quaternion |
Definition at line 312 of file JPosition3D.hh.
|
inlineinherited |
Transform position.
The final position is obtained as follows:
R | rotation matrix |
pos | position of origin (after rotation) |
Definition at line 331 of file JPosition3D.hh.
|
inlineinherited |
Transform back position.
The final position is obtained as follows:
R | rotation matrix |
pos | position of origin (before rotation) |
Definition at line 359 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
angle | angle |
Definition at line 378 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 393 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 408 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
vector | vector |
Definition at line 282 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Subtract vector.
vector | vector |
Definition at line 158 of file JVector3D.hh.
|
inlineinherited |
Scale vector.
factor | multiplication factor |
Definition at line 174 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
Scale vector.
factor | division factor |
Definition at line 190 of file JVector3D.hh.
|
inlineinherited |
Check equality.
vector | vector |
precision | precision |
Definition at line 221 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
Get length.
Definition at line 246 of file JVector3D.hh.
|
inlineinherited |
Get squared of distance to point.
pos | position |
Definition at line 258 of file JVector3D.hh.
|
inlineinherited |
Get distance to point.
pos | position |
Definition at line 270 of file JVector3D.hh.
|
inlineinherited |
Get cross product.
Note that this vector should not overlap with the first or second vector,
first | first vector |
second | second vector |
Definition at line 299 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
Type conversion operator.
Definition at line 283 of file JRotation3D.hh.
|
inlineinherited |
|
inlineinherited |
Matrix multiplication.
A | matrix |
B | matrix |
Definition at line 320 of file JRotation3D.hh.
|
inlineinherited |
Matrix multiplication.
A | matrix |
B | matrix |
Definition at line 241 of file JMath/JMatrix3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Rotate.
__x | x value |
__y | y value |
__z | z value |
Definition at line 336 of file JRotation3D.hh.
|
inlineinherited |
Rotate back.
__x | x value |
__y | y value |
__z | z value |
Definition at line 355 of file JRotation3D.hh.
|
inlinestaticinherited |
Get reference to unique instance of this class object.
Definition at line 78 of file JMath/JMatrix3D.hh.
|
inlineinherited |
|
inlinestaticinherited |
Get reference to unique instance of this class object.
Definition at line 106 of file JMath/JMatrix3D.hh.
|
inlineinherited |
|
inlineinherited |
Set matrix to the null matrix.
Definition at line 130 of file JMath/JMatrix3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Equality.
A | matrix |
eps | numerical precision |
Definition at line 267 of file JMath/JMatrix3D.hh.
|
inlineinherited |
Test identity.
eps | numerical precision |
Definition at line 288 of file JMath/JMatrix3D.hh.
|
inlineinherited |
|
inlineinherited |
Transform.
__x | x value |
__y | y value |
__z | z value |
Definition at line 318 of file JMath/JMatrix3D.hh.
|
protectedinherited |
Definition at line 310 of file JVector3D.hh.
|
protectedinherited |
Definition at line 311 of file JVector3D.hh.
|
protectedinherited |
Definition at line 312 of file JVector3D.hh.
|
inherited |
Definition at line 385 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 385 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 385 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 386 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 386 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 386 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 387 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 387 of file JMath/JMatrix3D.hh.
|
inherited |
Definition at line 387 of file JMath/JMatrix3D.hh.