Data structure for angles in three dimensions.
More...
#include <JAngle3D.hh>
Data structure for angles in three dimensions.
This class serves as input to the rotation matrix JRotation3D.
Definition at line 31 of file JAngle3D.hh.
◆ JAngle3D() [1/3]
JGEOMETRY3D::JAngle3D::JAngle3D |
( |
| ) |
|
|
inline |
◆ JAngle3D() [2/3]
JGEOMETRY3D::JAngle3D::JAngle3D |
( |
const double |
theta, |
|
|
const double |
phi |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
theta | theta angle [rad] |
phi | phi angle [rad] |
Definition at line 50 of file JAngle3D.hh.
◆ JAngle3D() [3/3]
JGEOMETRY3D::JAngle3D::JAngle3D |
( |
const double |
x, |
|
|
const double |
y, |
|
|
const double |
z |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
x | x value |
y | y value |
z | z value |
Definition at line 64 of file JAngle3D.hh.
70 const double v = x*x + y*y + z*z;
◆ getTheta()
double JGEOMETRY3D::JAngle3D::getTheta |
( |
| ) |
const |
|
inline |
Get theta angle.
- Returns
- theta angle
Definition at line 84 of file JAngle3D.hh.
◆ getPhi()
double JGEOMETRY3D::JAngle3D::getPhi |
( |
| ) |
const |
|
inline |
Get phi angle.
- Returns
- phi angle
Definition at line 95 of file JAngle3D.hh.
◆ getDX()
double JGEOMETRY3D::JAngle3D::getDX |
( |
| ) |
const |
|
inline |
Get x direction.
- Returns
- x direction
Definition at line 106 of file JAngle3D.hh.
◆ getDY()
double JGEOMETRY3D::JAngle3D::getDY |
( |
| ) |
const |
|
inline |
Get y direction.
- Returns
- y direction
Definition at line 117 of file JAngle3D.hh.
◆ getDZ()
double JGEOMETRY3D::JAngle3D::getDZ |
( |
| ) |
const |
|
inline |
Get z direction.
- Returns
- z direction
Definition at line 128 of file JAngle3D.hh.
◆ negate()
JAngle3D& JGEOMETRY3D::JAngle3D::negate |
( |
| ) |
|
|
inline |
Negate angle.
- Returns
- this angle
Definition at line 139 of file JAngle3D.hh.
◆ add()
Add angle.
- Parameters
-
- Returns
- this angle
Definition at line 154 of file JAngle3D.hh.
◆ sub()
Subtract angle.
- Parameters
-
- Returns
- this angle
Definition at line 169 of file JAngle3D.hh.
◆ mul() [1/2]
JAngle3D& JGEOMETRY3D::JAngle3D::mul |
( |
const double |
factor | ) |
|
|
inline |
Scale angle.
- Parameters
-
factor | multiplication factor |
- Returns
- this angle
Definition at line 183 of file JAngle3D.hh.
◆ div()
JAngle3D& JGEOMETRY3D::JAngle3D::div |
( |
const double |
factor | ) |
|
|
inline |
Scale angle.
- Parameters
-
- Returns
- this angle
Definition at line 198 of file JAngle3D.hh.
◆ equals()
bool JGEOMETRY3D::JAngle3D::equals |
( |
const JAngle3D & |
angle, |
|
|
const double |
precision = std::numeric_limits<double>::min() |
|
) |
| const |
|
inline |
Check equality.
- Parameters
-
angle | angle |
precision | precision |
- Returns
- true if angles are equal; else false
Definition at line 214 of file JAngle3D.hh.
◆ getDot()
double JGEOMETRY3D::JAngle3D::getDot |
( |
const JAngle3D & |
angle | ) |
const |
|
inline |
Get dot product.
- Parameters
-
- Returns
- dot product
Definition at line 228 of file JAngle3D.hh.
◆ normalise()
JAngle3D& JGEOMETRY3D::JAngle3D::normalise |
( |
| ) |
|
|
inline |
Normalise angles.
- theta angle will be between 0 and π
- phi angle will be between -π and +π
- Returns
- this angle
Definition at line 245 of file JAngle3D.hh.
◆ mul() [2/2]
Multiply with object.
- Parameters
-
- Returns
- result object
Definition at line 273 of file JMath.hh.
◆ operator>> [1/2]
std::istream& operator>> |
( |
std::istream & |
in, |
|
|
JAngle3D & |
angle |
|
) |
| |
|
friend |
Write angle from input.
- Parameters
-
in | input stream |
angle | angle |
- Returns
- input stream
Definition at line 266 of file JAngle3D.hh.
◆ operator<< [1/2]
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JAngle3D & |
angle |
|
) |
| |
|
friend |
Write angle to output.
- Parameters
-
out | output stream |
angle | angle |
- Returns
- output stream
Definition at line 281 of file JAngle3D.hh.
◆ operator>> [2/2]
Read angle from input.
- Parameters
-
- Returns
- reader
Definition at line 296 of file JAngle3D.hh.
◆ operator<< [2/2]
Write angle to output.
- Parameters
-
- Returns
- writer
Definition at line 312 of file JAngle3D.hh.
◆ __theta
double JGEOMETRY3D::JAngle3D::__theta |
|
protected |
◆ __phi
double JGEOMETRY3D::JAngle3D::__phi |
|
protected |
The documentation for this class was generated from the following file: