Data structure for direction in three dimensions.  
 More...
#include <JDirection3D.hh>
Data structure for direction in three dimensions. 
Definition at line 33 of file JDirection3D.hh.
 
◆ JDirection3D() [1/6]
  
  
      
        
          | JGEOMETRY3D::JDirection3D::JDirection3D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Default constructor. 
Definition at line 43 of file JDirection3D.hh.
JVersor3D()
Default constructor.
 
 
 
 
◆ JDirection3D() [2/6]
  
  
      
        
          | JGEOMETRY3D::JDirection3D::JDirection3D  | 
          ( | 
          const JVersor3D &  | 
          dir | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JDirection3D() [3/6]
  
  
      
        
          | JGEOMETRY3D::JDirection3D::JDirection3D  | 
          ( | 
          const JAngle3D &  | 
          angle | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 63 of file JDirection3D.hh.
double getDY() const
Get y direction.
 
double getDZ() const
Get z direction.
 
double getDX() const
Get x direction.
 
 
 
 
◆ JDirection3D() [4/6]
  
  
      
        
          | JGEOMETRY3D::JDirection3D::JDirection3D  | 
          ( | 
          const JVector3D &  | 
          pos | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 73 of file JDirection3D.hh.
double getY() const
Get y position.
 
double getZ() const
Get z position.
 
double getX() const
Get x position.
 
 
 
 
◆ JDirection3D() [5/6]
  
  
      
        
          | JGEOMETRY3D::JDirection3D::JDirection3D  | 
          ( | 
          const JVersor3Z &  | 
          dir | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 83 of file JDirection3D.hh.
double getDZ() const
Get z direction.
 
double getDY() const
Get y direction.
 
double getDX() const
Get x direction.
 
 
 
 
◆ JDirection3D() [6/6]
  
  
      
        
          | JGEOMETRY3D::JDirection3D::JDirection3D  | 
          ( | 
          const double  | 
          dx,  | 
         
        
           | 
           | 
          const double  | 
          dy,  | 
         
        
           | 
           | 
          const double  | 
          dz  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | dx | dx value  | 
    | dy | dy value  | 
    | dz | dz value  | 
  
   
Definition at line 95 of file JDirection3D.hh.
 
 
◆ getDirection() [1/2]
  
  
      
        
          | const JDirection3D& JGEOMETRY3D::JDirection3D::getDirection  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get direction. 
- Returns
 - direction 
 
Definition at line 107 of file JDirection3D.hh.
Data structure for direction in three dimensions.
 
 
 
 
◆ getDirection() [2/2]
◆ setDirection()
  
  
      
        
          | void JGEOMETRY3D::JDirection3D::setDirection  | 
          ( | 
          const JDirection3D &  | 
          dir | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ operator JAngle3D()
  
  
      
        
          | JGEOMETRY3D::JDirection3D::operator JAngle3D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - angle 
 
Definition at line 140 of file JDirection3D.hh.
Data structure for angles in three dimensions.
 
double getDY() const
Get y direction.
 
double getDX() const
Get x direction.
 
double getDZ() const
Get z direction.
 
 
 
 
◆ operator JVector3D()
  
  
      
        
          | JGEOMETRY3D::JDirection3D::operator JVector3D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - position 
 
Definition at line 151 of file JDirection3D.hh.
Data structure for vector in three dimensions.
 
 
 
 
◆ transform()
Transform. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 163 of file JDirection3D.hh.
JVersor3D & normalise()
Normalise versor.
 
 
 
 
◆ rotate() [1/5]
Rotate. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 179 of file JDirection3D.hh.
void rotate(double &__x, double &__y, double &__z) const
Rotate.
 
 
 
 
◆ rotate_back() [1/5]
Rotate back. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 195 of file JDirection3D.hh.
void rotate_back(double &__x, double &__y, double &__z) const
Rotate back.
 
 
 
 
◆ rotate() [2/5]
Rotate around X-axis. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 211 of file JDirection3D.hh.
void rotate(double &__x, double &__y) const
Rotate.
 
 
 
 
◆ rotate_back() [2/5]
Rotate back around X-axis. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 227 of file JDirection3D.hh.
void rotate_back(double &__x, double &__y) const
Rotate back.
 
 
 
 
◆ rotate() [3/5]
Rotate around Y-axis. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 243 of file JDirection3D.hh.
 
 
◆ rotate_back() [3/5]
Rotate back around Y-axis. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 259 of file JDirection3D.hh.
 
 
◆ rotate() [4/5]
Rotate around Z-axis. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 275 of file JDirection3D.hh.
 
 
◆ rotate_back() [4/5]
Rotate back around Z-axis. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 291 of file JDirection3D.hh.
 
 
◆ rotate() [5/5]
Rotate. 
- Parameters
 - 
  
  
 
- Returns
 - this position 
 
Definition at line 307 of file JDirection3D.hh.
void rotate(double &__x, double &__y, double &__z) const
Rotate.
 
 
 
 
◆ rotate_back() [5/5]
Rotate back. 
- Parameters
 - 
  
  
 
- Returns
 - this position 
 
Definition at line 321 of file JDirection3D.hh.
void rotate_back(double &__x, double &__y, double &__z) const
Rotate back.
 
 
 
 
◆ getDot() [1/5]
  
  
      
        
          | double JGEOMETRY3D::JDirection3D::getDot  | 
          ( | 
          const JAngle3D &  | 
          angle | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 335 of file JDirection3D.hh.
 
 
◆ getDot() [2/5]
  
  
      
        
          | double JGEOMETRY3D::JDirection3D::getDot  | 
          ( | 
          const JVector3D &  | 
          pos | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 350 of file JDirection3D.hh.
 
 
◆ getDot() [3/5]
  
  
      
        
          | double JGEOMETRY3D::JDirection3D::getDot  | 
          ( | 
          const JVersor3Z &  | 
          dir | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 365 of file JDirection3D.hh.
 
 
◆ getDot() [4/5]
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getDot | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 156 of file JVersor3D.hh.
  159         getDX() * versor.getDX() + 
 
  160         getDY() * versor.getDY() +
 
  161         getDZ() * versor.getDZ();
 
 
 
 
◆ negate()
  
  
      
        
          | JVersor3D& JGEOMETRY3D::JVersor3D::negate  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Negate versor. 
- Returns
 - this versor 
 
Definition at line 64 of file JVersor3D.hh.
 
 
◆ equals()
  
  
      
        
          | bool JGEOMETRY3D::JVersor3D::equals  | 
          ( | 
          const JVersor3D &  | 
          versor,  | 
         
        
           | 
           | 
          const double  | 
          precision = std::numeric_limits<double>::min()  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Check equality. 
- Parameters
 - 
  
    | versor | versor  | 
    | precision | precision  | 
  
   
- Returns
 - true if versors are equal; else false 
 
Definition at line 81 of file JVersor3D.hh.
   84       return (fabs(
getDX() - versor.
getDX()) <= precision &&
 
 
 
 
◆ getDX()
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getDX  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get x direction. 
- Returns
 - x direction 
 
Definition at line 95 of file JVersor3D.hh.
 
 
◆ getDY()
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getDY  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get y direction. 
- Returns
 - y direction 
 
Definition at line 106 of file JVersor3D.hh.
 
 
◆ getDZ()
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getDZ  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get z direction. 
- Returns
 - z direction 
 
Definition at line 117 of file JVersor3D.hh.
 
 
◆ getTheta()
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getTheta  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get theta angle. 
- Returns
 - theta angle [rad] 
 
Definition at line 128 of file JVersor3D.hh.
  132       else if (
__dz < -1.0)
 
static const double PI
Mathematical constants.
 
 
 
 
◆ getPhi()
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getPhi  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get phi angle. 
- Returns
 - phi angle [rad] 
 
Definition at line 144 of file JVersor3D.hh.
 
 
◆ getDot() [5/5]
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::getDot  | 
          ( | 
          const JVersor3D &  | 
          versor | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 156 of file JVersor3D.hh.
 
 
◆ getCross()
Get cross product. 
Note that this versor should not overlap with the first or second versor,
- Parameters
 - 
  
    | first | first versor  | 
    | second | second versor  | 
  
   
- Returns
 - this versor 
 
Definition at line 173 of file JVersor3D.hh.
 
 
◆ normalise()
  
  
      
        
          | JVersor3D& JGEOMETRY3D::JVersor3D::normalise  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Normalise versor. 
This operation may set the result to the unit z-vector.
- Returns
 - this versor 
 
Definition at line 192 of file JVersor3D.hh.
 
 
◆ mul()
template<class JFirst_t , class JSecond_t > 
  
  
      
        
          | JFirst_t& JMATH::JMath< JFirst_t, JSecond_t >::mul  | 
          ( | 
          const JSecond_t &  | 
          object | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Multiply with object. 
- Parameters
 - 
  
  
 
- Returns
 - result object 
 
Definition at line 354 of file JMath.hh.
  356       return static_cast<JFirst_t&
>(*this) = JFirst_t().mul(
static_cast<const JFirst_t&
>(*
this), 
object);
 
 
 
 
◆ operator>> [1/2]
  
  
      
        
          | std::istream& operator>>  | 
          ( | 
          std::istream &  | 
          in,  | 
         
        
           | 
           | 
          JDirection3D &  | 
          direction  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Read direction from input. 
- Parameters
 - 
  
    | in | input stream  | 
    | direction | direction  | 
  
   
- Returns
 - input stream 
 
Definition at line 381 of file JDirection3D.hh.
  383       in >> direction.
__dx >> direction.
__dy >> direction.
__dz;
 
 
 
 
◆ operator<< [1/2]
  
  
      
        
          | std::ostream& operator<<  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const JDirection3D &  | 
          direction  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Write direction to output. 
- Parameters
 - 
  
    | out | output stream  | 
    | direction | direction  | 
  
   
- Returns
 - output stream 
 
Definition at line 398 of file JDirection3D.hh.
  400       const JFormat format(out, getFormat<JDirection3D>(
JFormat_t(9, 6, std::ios::fixed | std::ios::showpos)));
 
  402       out << format << direction.
getDX() << 
' ' 
  403           << format << direction.
getDY() << 
' ' 
  404           << format << direction.
getDZ();
 
 
 
 
◆ operator>> [2/2]
Read direction from input. 
- Parameters
 - 
  
    | in | reader  | 
    | direction | direction  | 
  
   
- Returns
 - reader 
 
Definition at line 417 of file JDirection3D.hh.
  419       return in >> direction.
__dx >> direction.
__dy >> direction.
__dz;
 
 
 
 
◆ operator<< [2/2]
Write direction to output. 
- Parameters
 - 
  
    | out | writer  | 
    | direction | direction  | 
  
   
- Returns
 - writer 
 
Definition at line 430 of file JDirection3D.hh.
  432       return out << direction.
__dx << direction.
__dy << direction.
__dz;
 
 
 
 
◆ __dx
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::__dx | 
         
       
   | 
  
protectedinherited   | 
  
 
 
◆ __dy
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::__dy | 
         
       
   | 
  
protectedinherited   | 
  
 
 
◆ __dz
  
  
      
        
          | double JGEOMETRY3D::JVersor3D::__dz | 
         
       
   | 
  
protectedinherited   | 
  
 
 
The documentation for this class was generated from the following file: