Data structure for direction in two dimensions.
More...
#include <JDirection2D.hh>
Data structure for direction in two dimensions.
Definition at line 30 of file JDirection2D.hh.
◆ JDirection2D() [1/5]
JGEOMETRY2D::JDirection2D::JDirection2D |
( |
| ) |
|
|
inline |
◆ JDirection2D() [2/5]
JGEOMETRY2D::JDirection2D::JDirection2D |
( |
const JVersor2D & |
dir | ) |
|
|
inline |
◆ JDirection2D() [3/5]
JGEOMETRY2D::JDirection2D::JDirection2D |
( |
const JAngle2D & |
angle | ) |
|
|
inline |
◆ JDirection2D() [4/5]
JGEOMETRY2D::JDirection2D::JDirection2D |
( |
const JVector2D & |
pos | ) |
|
|
inline |
◆ JDirection2D() [5/5]
JGEOMETRY2D::JDirection2D::JDirection2D |
( |
const double |
dx, |
|
|
const double |
dy |
|
) |
| |
|
inline |
◆ getDirection() [1/2]
const JDirection2D& JGEOMETRY2D::JDirection2D::getDirection |
( |
| ) |
const |
|
inline |
Get direction.
- Returns
- direction
Definition at line 94 of file JDirection2D.hh.
96 return static_cast<const JDirection2D&>(*
this);
◆ getDirection() [2/2]
Get direction.
- Returns
- direction
Definition at line 105 of file JDirection2D.hh.
107 return static_cast<JDirection2D&>(*
this);
◆ setDirection()
void JGEOMETRY2D::JDirection2D::setDirection |
( |
const JDirection2D & |
dir | ) |
|
|
inline |
Set direction.
- Parameters
-
Definition at line 116 of file JDirection2D.hh.
118 static_cast<JDirection2D&>(*
this) = dir;
◆ operator JAngle2D()
JGEOMETRY2D::JDirection2D::operator JAngle2D |
( |
| ) |
const |
|
inline |
◆ operator JVector2D()
JGEOMETRY2D::JDirection2D::operator JVector2D |
( |
| ) |
const |
|
inline |
◆ transform()
Transform.
- Parameters
-
- Returns
- this direction
Definition at line 150 of file JDirection2D.hh.
◆ rotate()
◆ rotate_back()
Rotate back.
- Parameters
-
- Returns
- this direction
Definition at line 182 of file JDirection2D.hh.
◆ getDot() [1/4]
double JGEOMETRY2D::JDirection2D::getDot |
( |
const JAngle2D & |
angle | ) |
const |
|
inline |
Get dot product.
- Parameters
-
- Returns
- dot product
Definition at line 198 of file JDirection2D.hh.
◆ getDot() [2/4]
double JGEOMETRY2D::JDirection2D::getDot |
( |
const JVector2D & |
pos | ) |
const |
|
inline |
Get dot product.
- Parameters
-
- Returns
- dot product
Definition at line 212 of file JDirection2D.hh.
◆ getPerpDot() [1/4]
double JGEOMETRY2D::JDirection2D::getPerpDot |
( |
const JAngle2D & |
angle | ) |
const |
|
inline |
Get perpendicular dot product.
- Parameters
-
- Returns
- perpendicular dot product
Definition at line 226 of file JDirection2D.hh.
◆ getPerpDot() [2/4]
double JGEOMETRY2D::JDirection2D::getPerpDot |
( |
const JVector2D & |
pos | ) |
const |
|
inline |
Get perpendicular dot product.
- Parameters
-
- Returns
- perpendicular dot product
Definition at line 240 of file JDirection2D.hh.
◆ getDot() [3/4]
double JGEOMETRY2D::JVersor2D::getDot |
|
inline |
Get dot product.
- Parameters
-
- Returns
- dot product
Definition at line 115 of file JVersor2D.hh.
118 getDX() * versor.getDX() +
119 getDY() * versor.getDY();
◆ getPerpDot() [3/4]
double JGEOMETRY2D::JVersor2D::getPerpDot |
|
inline |
Get perpendicular dot product.
- Parameters
-
- Returns
- perpendicular dot product
Definition at line 129 of file JVersor2D.hh.
132 getDX() * versor.getDY() -
133 getDY() * versor.getDX();
◆ getDX()
double JGEOMETRY2D::JVersor2D::getDX |
( |
| ) |
const |
|
inlineinherited |
Get x direction.
- Returns
- x direction
Definition at line 53 of file JVersor2D.hh.
◆ getDY()
double JGEOMETRY2D::JVersor2D::getDY |
( |
| ) |
const |
|
inlineinherited |
Get y direction.
- Returns
- y direction
Definition at line 64 of file JVersor2D.hh.
◆ getPhi()
double JGEOMETRY2D::JVersor2D::getPhi |
( |
| ) |
const |
|
inlineinherited |
Get phi angle.
- Returns
- phi angle [rad]
Definition at line 75 of file JVersor2D.hh.
◆ negate()
JVersor2D& JGEOMETRY2D::JVersor2D::negate |
( |
| ) |
|
|
inlineinherited |
Negate versor.
- Returns
- this versor
Definition at line 86 of file JVersor2D.hh.
◆ equals()
bool JGEOMETRY2D::JVersor2D::equals |
( |
const JVersor2D & |
versor, |
|
|
const double |
precision = std::numeric_limits<double>::min() |
|
) |
| const |
|
inlineinherited |
Check equality.
- Parameters
-
- Returns
- true if versors are equal; else false
Definition at line 101 of file JVersor2D.hh.
104 return (fabs(
getDX() - versor.
getDX()) <= precision &&
◆ getDot() [4/4]
double JGEOMETRY2D::JVersor2D::getDot |
( |
const JVersor2D & |
versor | ) |
const |
|
inlineinherited |
Get dot product.
- Parameters
-
- Returns
- dot product
Definition at line 115 of file JVersor2D.hh.
◆ getPerpDot() [4/4]
double JGEOMETRY2D::JVersor2D::getPerpDot |
( |
const JVersor2D & |
versor | ) |
const |
|
inlineinherited |
Get perpendicular dot product.
- Parameters
-
- Returns
- perpendicular dot product
Definition at line 129 of file JVersor2D.hh.
◆ normalise()
JVersor2D& JGEOMETRY2D::JVersor2D::normalise |
( |
| ) |
|
|
inlineinherited |
Normalise versor.
This operation may set the result to the unit y-vector.
- Returns
- this versor
Definition at line 143 of file JVersor2D.hh.
◆ operator>> [1/2]
std::istream& operator>> |
( |
std::istream & |
in, |
|
|
JDirection2D & |
direction |
|
) |
| |
|
friend |
Read direction from input.
- Parameters
-
in | input stream |
direction | direction |
- Returns
- input stream
Definition at line 255 of file JDirection2D.hh.
257 in >> direction.
__dx >> direction.
__dy;
◆ operator<< [1/2]
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JDirection2D & |
direction |
|
) |
| |
|
friend |
Write direction to output.
- Parameters
-
out | output stream |
direction | direction |
- Returns
- output stream
Definition at line 270 of file JDirection2D.hh.
272 out << direction.
getDX() <<
' ' << direction.
getDY();
◆ operator>> [2/2]
Read direction from input.
- Parameters
-
in | reader |
direction | direction |
- Returns
- reader
Definition at line 285 of file JDirection2D.hh.
287 in >> direction.
__dx;
288 in >> direction.
__dy;
◆ operator<< [2/2]
Write direction to output.
- Parameters
-
out | writer |
direction | direction |
- Returns
- writer
Definition at line 301 of file JDirection2D.hh.
303 out << direction.
getDX();
304 out << direction.
getDY();
◆ __dx
double JGEOMETRY2D::JVersor2D::__dx |
|
protectedinherited |
◆ __dy
double JGEOMETRY2D::JVersor2D::__dy |
|
protectedinherited |
The documentation for this class was generated from the following file: