Jpp
18.2.0-rc.1
the software that should make you happy
|
Axis object. More...
#include <JAxis2D.hh>
Public Member Functions | |
JAxis2D () | |
Default constructor. More... | |
JAxis2D (const JVector2D &pos) | |
Constructor. More... | |
JAxis2D (const JVector2D &pos, const JVersor2D &dir) | |
Constructor. More... | |
JAxis2D (const JSegment2D &segment) | |
Constructor. More... | |
const JAxis2D & | getAxis () const |
Get axis. More... | |
void | setAxis (const JAxis2D &axis) |
Set axis. More... | |
JAxis2D & | negate () |
Negate axis. More... | |
void | move (const double step) |
Move vertex along this axis. More... | |
bool | intersects (const JSegment2D &segment) const |
Test whether this axis and given line segment intersect. More... | |
double | getIntersection (const JAxis2D &axis, const double precision=1.0e-8) const |
Get intersection of two axes. More... | |
double | getDistanceSquared (const JVector2D &point) const |
Get squared of distance to point. More... | |
double | getDistance (const JVector2D &point) const |
Get distance to point. More... | |
JAxis2D & | rotate (const JRotation2D &R) |
Rotate axis. More... | |
JAxis2D & | rotate_back (const JRotation2D &R) |
Rotate back axis. More... | |
const JPosition2D & | getPosition () const |
Get position. More... | |
JPosition2D & | getPosition () |
Get position. More... | |
void | setPosition (const JVector2D &pos) |
Set position. More... | |
operator JAngle2D () const | |
Type conversion operator. More... | |
operator JVersor2D () const | |
Type conversion operator. More... | |
double | getDot (const JAngle2D &angle) const |
Get dot product. More... | |
double | getDot (const JVersor2D &versor) const |
Get dot product. More... | |
double | getDot (const JVector2D &point) const |
Get dot product. More... | |
double | getPerpDot (const JAngle2D &angle) const |
Get perpendicular dot product. More... | |
double | getPerpDot (const JVersor2D &dir) const |
Get perpendicular dot product. More... | |
double | getPerpDot (const JVector2D &point) const |
Get perpendicular dot product. More... | |
double | getX () const |
Get x position. More... | |
double | getY () const |
Get y position. More... | |
JVector2D & | add (const JVector2D &vector) |
Add vector. More... | |
JVector2D & | sub (const JVector2D &vector) |
Subtract vector. More... | |
JVector2D & | mul (const double factor) |
Scale vector. More... | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. More... | |
JVector2D & | div (const double factor) |
Scale vector. More... | |
JVector2D & | transform (const JMatrix2D &T) |
Transform. More... | |
bool | equals (const JVector2D &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... | |
const JDirection2D & | getDirection () const |
Get direction. More... | |
JDirection2D & | getDirection () |
Get direction. More... | |
void | setDirection (const JDirection2D &dir) |
Set direction. More... | |
operator JAngle2D () const | |
Type conversion operator. More... | |
operator JVector2D () const | |
Type conversion operator. More... | |
JDirection2D & | transform (const JMatrix2D &T) |
Transform. More... | |
double | getDot (const JAngle2D &angle) const |
Get dot product. More... | |
double | getDot (const JVector2D &pos) const |
Get dot product. More... | |
double | getDot (const JVersor2D &versor) const |
Get dot product. More... | |
double | getPerpDot (const JAngle2D &angle) const |
Get perpendicular dot product. More... | |
double | getPerpDot (const JVector2D &pos) const |
Get perpendicular dot product. More... | |
double | getPerpDot (const JVersor2D &versor) const |
Get perpendicular dot product. More... | |
double | getDX () const |
Get x direction. More... | |
double | getDY () const |
Get y direction. More... | |
double | getPhi () const |
Get phi angle. More... | |
bool | equals (const JVersor2D &versor, const double precision=std::numeric_limits< double >::min()) const |
Check equality. More... | |
JVersor2D & | normalise () |
Normalise versor. More... | |
Protected Attributes | |
double | __x |
double | __y |
double | __dx |
double | __dy |
Friends | |
std::istream & | operator>> (std::istream &in, JAxis2D &axis) |
Read axis from input. More... | |
std::ostream & | operator<< (std::ostream &out, const JAxis2D &axis) |
Write axis to output. More... | |
JReader & | operator>> (JReader &in, JAxis2D &axis) |
Read axis from input. More... | |
JWriter & | operator<< (JWriter &out, const JAxis2D &axis) |
Write axis to output. More... | |
Axis object.
An axis object consists of a position and a direction.
Definition at line 32 of file JAxis2D.hh.
|
inline |
Default constructor.
Definition at line 40 of file JAxis2D.hh.
|
inline |
Constructor.
pos | position |
Definition at line 51 of file JAxis2D.hh.
Constructor.
pos | position |
dir | direction |
Definition at line 63 of file JAxis2D.hh.
|
inline |
Constructor.
segment | line segment |
Definition at line 75 of file JAxis2D.hh.
|
inline |
|
inline |
|
inline |
Negate axis.
Definition at line 108 of file JAxis2D.hh.
|
inline |
Move vertex along this axis.
step | step |
Definition at line 122 of file JAxis2D.hh.
|
inline |
Test whether this axis and given line segment intersect.
segment | line segment |
Definition at line 134 of file JAxis2D.hh.
|
inline |
Get intersection of two axes.
axis | axis |
precision | precision |
Definition at line 152 of file JAxis2D.hh.
|
inline |
Get squared of distance to point.
point | point |
Definition at line 169 of file JAxis2D.hh.
|
inline |
Get distance to point.
point | point |
Definition at line 190 of file JAxis2D.hh.
|
inline |
Rotate axis.
R | rotation matrix |
Definition at line 202 of file JAxis2D.hh.
|
inline |
Rotate back axis.
R | rotation matrix |
Definition at line 217 of file JAxis2D.hh.
|
inlineinherited |
Get position.
Definition at line 98 of file JPosition2D.hh.
|
inlineinherited |
Get position.
Definition at line 109 of file JPosition2D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Type conversion operator.
Definition at line 142 of file JPosition2D.hh.
|
inlineinherited |
Get dot product.
angle | angle |
Definition at line 182 of file JPosition2D.hh.
|
inlineinherited |
Get dot product.
versor | versor |
Definition at line 196 of file JPosition2D.hh.
|
inlineinherited |
Get dot product.
point | vector |
Definition at line 235 of file JVector2D.hh.
|
inlineinherited |
Get perpendicular dot product.
angle | angle |
Definition at line 210 of file JPosition2D.hh.
|
inlineinherited |
Get perpendicular dot product.
dir | direction |
Definition at line 224 of file JPosition2D.hh.
|
inlineinherited |
Get perpendicular dot product.
point | vector |
Definition at line 249 of file JVector2D.hh.
|
inlineinherited |
|
inlineinherited |
Subtract vector.
vector | vector |
Definition at line 115 of file JVector2D.hh.
|
inlineinherited |
Scale vector.
factor | multiplication factor |
Definition at line 130 of file JVector2D.hh.
|
inlineinherited |
|
inlineinherited |
Scale vector.
factor | division factor |
Definition at line 145 of file JVector2D.hh.
|
inlineinherited |
Check equality.
vector | vector |
precision | precision |
Definition at line 175 of file JVector2D.hh.
|
inlineinherited |
|
inlineinherited |
Get length.
Definition at line 199 of file JVector2D.hh.
|
inlineinherited |
Get direction.
Definition at line 95 of file JDirection2D.hh.
|
inlineinherited |
Get direction.
Definition at line 106 of file JDirection2D.hh.
|
inlineinherited |
Set direction.
dir | direction |
Definition at line 117 of file JDirection2D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Transform.
T | matrix |
Definition at line 151 of file JDirection2D.hh.
|
inlineinherited |
Get dot product.
angle | angle |
Definition at line 199 of file JDirection2D.hh.
|
inlineinherited |
Get dot product.
pos | position |
Definition at line 213 of file JDirection2D.hh.
|
inlineinherited |
Get dot product.
versor | versor |
Definition at line 116 of file JVersor2D.hh.
|
inlineinherited |
Get perpendicular dot product.
angle | angle |
Definition at line 227 of file JDirection2D.hh.
|
inlineinherited |
Get perpendicular dot product.
pos | position |
Definition at line 241 of file JDirection2D.hh.
|
inlineinherited |
Get perpendicular dot product.
versor | versor |
Definition at line 130 of file JVersor2D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Check equality.
versor | versor |
precision | precision |
Definition at line 102 of file JVersor2D.hh.
|
inlineinherited |
Normalise versor.
This operation may set the result to the unit y-vector.
Definition at line 144 of file JVersor2D.hh.
|
friend |
Read axis from input.
in | input stream |
axis | axis |
Definition at line 233 of file JAxis2D.hh.
|
friend |
Write axis to output.
out | output stream |
axis | axis |
Definition at line 249 of file JAxis2D.hh.
Read axis from input.
in | reader |
axis | axis |
Definition at line 266 of file JAxis2D.hh.
Write axis to output.
out | writer |
axis | axis |
Definition at line 282 of file JAxis2D.hh.
|
protectedinherited |
Definition at line 257 of file JVector2D.hh.
|
protectedinherited |
Definition at line 258 of file JVector2D.hh.
|
protectedinherited |
Definition at line 160 of file JVersor2D.hh.
|
protectedinherited |
Definition at line 161 of file JVersor2D.hh.