|
Jpp
17.2.1-pre0
the software that should make you happy
|
Data structure for position in three dimensions. More...
#include <JPosition3D.hh>
Public Member Functions | |
| JPosition3D () | |
| Default constructor. More... | |
| JPosition3D (const JVector3D &pos) | |
| Constructor. More... | |
| JPosition3D (const JAngle3D &angle) | |
| Constructor. More... | |
| JPosition3D (const JVersor3D &dir) | |
| Constructor. More... | |
| JPosition3D (const JVersor3Z &dir) | |
| Constructor. More... | |
| JPosition3D (const JVector2D &pos, const double z) | |
| Constructor. More... | |
| JPosition3D (const double x, const double y, const double z) | |
| Constructor. More... | |
| const JPosition3D & | getPosition () const |
| Get position. More... | |
| JPosition3D & | getPosition () |
| Get position. More... | |
| void | setPosition (const JVector3D &pos) |
| Set position. More... | |
| operator JAngle3D () const | |
| Type conversion operator. More... | |
| operator JVersor3D () const | |
| Type conversion operator. More... | |
| JPosition3D & | rotate (const JRotation3D &R) |
| Rotate. More... | |
| JPosition3D & | rotate_back (const JRotation3D &R) |
| Rotate back. More... | |
| JPosition3D & | rotate (const JRotation3X &R) |
| Rotate around X-axis. More... | |
| JPosition3D & | rotate_back (const JRotation3X &R) |
| Rotate back around X-axis. More... | |
| JPosition3D & | rotate (const JRotation3Y &R) |
| Rotate around Y-axis. More... | |
| JPosition3D & | rotate_back (const JRotation3Y &R) |
| Rotate back around Y-axis. More... | |
| JPosition3D & | rotate (const JRotation3Z &R) |
| Rotate around Z-axis. More... | |
| JPosition3D & | rotate_back (const JRotation3Z &R) |
| Rotate back around Z-axis. More... | |
| JPosition3D & | rotate (const JQuaternion3D &Q) |
| Rotate. More... | |
| JPosition3D & | rotate_back (const JQuaternion3D &Q) |
| Rotate back. More... | |
| void | transform (const JRotation3D &R, const JVector3D &pos) |
| Transform position. More... | |
| void | transform_back (const JRotation3D &R, const JVector3D &pos) |
| Transform back position. More... | |
| double | getDot (const JAngle3D &angle) const |
| Get dot product. More... | |
| double | getDot (const JVersor3D &dir) const |
| Get dot product. More... | |
| double | getDot (const JVersor3Z &dir) const |
| Get dot product. More... | |
| operator JVector2D () const | |
| Type conversion operator. More... | |
| double | getX () const |
| Get x position. More... | |
| double | getY () const |
| Get y position. More... | |
| double | getZ () const |
| Get z position. More... | |
| JVector3D & | negate () |
| Negate vector. More... | |
| JVector3D & | add (const JVector3D &vector) |
| Add vector. More... | |
| JVector3D & | sub (const JVector3D &vector) |
| Subtract vector. More... | |
| JVector3D & | mul (const double factor) |
| Scale vector. More... | |
| JFirst_t & | mul (const JSecond_t &object) |
| Multiply with object. More... | |
| JVector3D & | div (const double factor) |
| Scale vector. More... | |
| JVector3D & | transform (const JMatrix3D &T) |
| Transform. More... | |
| bool | equals (const JVector3D &vector, const double precision=std::numeric_limits< double >::min()) const |
| Check equality. More... | |
| double | getLengthSquared () const |
| Get length squared. More... | |
| double | getLength () const |
| Get length. More... | |
| double | getDistanceSquared (const JVector3D &pos) const |
| Get squared of distance to point. More... | |
| double | getDistance (const JVector3D &pos) const |
| Get distance to point. More... | |
| double | getDot (const JVector3D &vector) const |
| Get dot product. More... | |
| JVector3D & | getCross (const JVector3D &first, const JVector3D &second) |
| Get cross product. More... | |
Protected Attributes | |
| double | __x |
| double | __y |
| double | __z |
Friends | |
| std::istream & | operator>> (std::istream &in, JPosition3D &position) |
| Read position from input. More... | |
| std::ostream & | operator<< (std::ostream &out, const JPosition3D &position) |
| Write position to output. More... | |
| JReader & | operator>> (JReader &in, JPosition3D &position) |
| Read position from input. More... | |
| JWriter & | operator<< (JWriter &out, const JPosition3D &position) |
| Write position to output. More... | |
Data structure for position in three dimensions.
Definition at line 36 of file JPosition3D.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get position.
Definition at line 130 of file JPosition3D.hh.
|
inline |
Get position.
Definition at line 141 of file JPosition3D.hh.
|
inline |
|
inline |
|
inline |
Type conversion operator.
Definition at line 174 of file JPosition3D.hh.
|
inline |
Rotate.
| R | rotation matrix |
Definition at line 186 of file JPosition3D.hh.
|
inline |
Rotate back.
| R | rotation matrix |
Definition at line 200 of file JPosition3D.hh.
|
inline |
Rotate around X-axis.
| R | rotation matrix |
Definition at line 214 of file JPosition3D.hh.
|
inline |
Rotate back around X-axis.
| R | rotation matrix |
Definition at line 228 of file JPosition3D.hh.
|
inline |
Rotate around Y-axis.
| R | rotation matrix |
Definition at line 242 of file JPosition3D.hh.
|
inline |
Rotate back around Y-axis.
| R | rotation matrix |
Definition at line 256 of file JPosition3D.hh.
|
inline |
Rotate around Z-axis.
| R | rotation matrix |
Definition at line 270 of file JPosition3D.hh.
|
inline |
Rotate back around Z-axis.
| R | rotation matrix |
Definition at line 284 of file JPosition3D.hh.
|
inline |
Rotate.
| Q | quaternion |
Definition at line 298 of file JPosition3D.hh.
|
inline |
Rotate back.
| Q | quaternion |
Definition at line 312 of file JPosition3D.hh.
|
inline |
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.
|
inline |
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.
|
inline |
Get dot product.
| angle | angle |
Definition at line 378 of file JPosition3D.hh.
|
inline |
Get dot product.
| dir | direction |
Definition at line 393 of file JPosition3D.hh.
|
inline |
Get dot product.
| dir | direction |
Definition at line 408 of file JPosition3D.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 dot product.
| vector | vector |
Definition at line 282 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.
|
friend |
Read position from input.
| in | input stream |
| position | position |
Definition at line 424 of file JPosition3D.hh.
|
friend |
Write position to output.
| out | output stream |
| position | position |
Definition at line 439 of file JPosition3D.hh.
|
friend |
Read position from input.
| in | reader |
| position | position |
Definition at line 458 of file JPosition3D.hh.
|
friend |
Write position to output.
| out | writer |
| position | position |
Definition at line 471 of file JPosition3D.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.
1.8.5