Data structure for direction in two dimensions.  
 More...
#include <JDirection2D.hh>
Data structure for direction in two dimensions. 
Definition at line 31 of file JDirection2D.hh.
 
◆ JDirection2D() [1/5]
  
  
      
        
          | JGEOMETRY2D::JDirection2D::JDirection2D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Default constructor. 
Definition at line 43 of file JDirection2D.hh.
JVersor2D()
Default constructor.
 
 
 
 
◆ JDirection2D() [2/5]
  
  
      
        
          | JGEOMETRY2D::JDirection2D::JDirection2D  | 
          ( | 
          const JVersor2D &  | 
          dir | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 53 of file JDirection2D.hh.
double getDX() const
Get x direction.
 
double getDY() const
Get y direction.
 
 
 
 
◆ JDirection2D() [3/5]
  
  
      
        
          | JGEOMETRY2D::JDirection2D::JDirection2D  | 
          ( | 
          const JAngle2D &  | 
          angle | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 63 of file JDirection2D.hh.
double getDY() const
Get y direction.
 
double getDX() const
Get x direction.
 
 
 
 
◆ JDirection2D() [4/5]
  
  
      
        
          | JGEOMETRY2D::JDirection2D::JDirection2D  | 
          ( | 
          const JVector2D &  | 
          pos | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 73 of file JDirection2D.hh.
double getY() const
Get y position.
 
double getX() const
Get x position.
 
 
 
 
◆ 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 95 of file JDirection2D.hh.
Data structure for direction in two dimensions.
 
 
 
 
◆ getDirection() [2/2]
◆ setDirection()
  
  
      
        
          | void JGEOMETRY2D::JDirection2D::setDirection  | 
          ( | 
          const JDirection2D &  | 
          dir | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ operator JAngle2D()
  
  
      
        
          | JGEOMETRY2D::JDirection2D::operator JAngle2D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - angle 
 
Definition at line 128 of file JDirection2D.hh.
Data structure for angle in two dimensions.
 
 
 
 
◆ operator JVector2D()
  
  
      
        
          | JGEOMETRY2D::JDirection2D::operator JVector2D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - position 
 
Definition at line 139 of file JDirection2D.hh.
Data structure for vector in two dimensions.
 
 
 
 
◆ transform()
Transform. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 151 of file JDirection2D.hh.
JVersor2D & normalise()
Normalise versor.
 
 
 
 
◆ rotate()
Rotate. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 167 of file JDirection2D.hh.
void rotate(double &__x, double &__y) const
Rotate.
 
 
 
 
◆ rotate_back()
Rotate back. 
- Parameters
 - 
  
  
 
- Returns
 - this direction 
 
Definition at line 183 of file JDirection2D.hh.
void rotate_back(double &__x, double &__y) const
Rotate back.
 
 
 
 
◆ getDot() [1/4]
  
  
      
        
          | double JGEOMETRY2D::JDirection2D::getDot  | 
          ( | 
          const JAngle2D &  | 
          angle | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 199 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 213 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 227 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 241 of file JDirection2D.hh.
 
 
◆ getDot() [3/4]
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getDot | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 116 of file JVersor2D.hh.
  119         getDX() * versor.getDX() + 
 
  120         getDY() * versor.getDY();
 
 
 
 
◆ getPerpDot() [3/4]
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getPerpDot | 
         
       
   | 
  
inline   | 
  
 
Get perpendicular dot product. 
- Parameters
 - 
  
  
 
- Returns
 - perpendicular dot product 
 
Definition at line 130 of file JVersor2D.hh.
  133         getDX() * versor.getDY() - 
 
  134         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
 - 
  
    | versor | versor  | 
    | precision | precision  | 
  
   
- Returns
 - true if versors are equal; else false 
 
Definition at line 102 of file JVersor2D.hh.
  105       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 116 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 130 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 144 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 256 of file JDirection2D.hh.
  258       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 273 of file JDirection2D.hh.
  275       const JFormat format(out, getFormat<JDirection2D>(
JFormat_t(9, 6, std::ios::fixed | std::ios::showpos)));
 
  277       out << format << direction.
getDX() << 
' '  
  278           << format << direction.
getDY();
 
 
 
 
◆ operator>> [2/2]
Read direction from input. 
- Parameters
 - 
  
    | in | reader  | 
    | direction | direction  | 
  
   
- Returns
 - reader 
 
Definition at line 291 of file JDirection2D.hh.
  293       in >> direction.
__dx;
 
  294       in >> direction.
__dy;
 
 
 
 
◆ operator<< [2/2]
Write direction to output. 
- Parameters
 - 
  
    | out | writer  | 
    | direction | direction  | 
  
   
- Returns
 - writer 
 
Definition at line 307 of file JDirection2D.hh.
  309       out << direction.
__dx;
 
  310       out << direction.
__dy;
 
 
 
 
◆ __dx
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::__dx | 
         
       
   | 
  
protectedinherited   | 
  
 
 
◆ __dy
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::__dy | 
         
       
   | 
  
protectedinherited   | 
  
 
 
The documentation for this class was generated from the following file: