Data structure for position in two dimensions.  
 More...
#include <JPosition2D.hh>
Data structure for position in two dimensions. 
Definition at line 30 of file JPosition2D.hh.
 
◆ JPosition2D() [1/5]
  
  
      
        
          | JGEOMETRY2D::JPosition2D::JPosition2D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JPosition2D() [2/5]
  
  
      
        
          | JGEOMETRY2D::JPosition2D::JPosition2D  | 
          ( | 
          const JVector2D &  | 
          pos | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JPosition2D() [3/5]
  
  
      
        
          | JGEOMETRY2D::JPosition2D::JPosition2D  | 
          ( | 
          const JAngle2D &  | 
          angle | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JPosition2D() [4/5]
  
  
      
        
          | JGEOMETRY2D::JPosition2D::JPosition2D  | 
          ( | 
          const JVersor2D &  | 
          dir | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JPosition2D() [5/5]
  
  
      
        
          | JGEOMETRY2D::JPosition2D::JPosition2D  | 
          ( | 
          const double  | 
          x,  | 
         
        
           | 
           | 
          const double  | 
          y  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
 
◆ getPosition() [1/2]
  
  
      
        
          | const JPosition2D& JGEOMETRY2D::JPosition2D::getPosition  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get position. 
- Returns
 - position 
 
Definition at line 97 of file JPosition2D.hh.
   99       return static_cast<const JPosition2D&>(*
this);
 
 
 
 
◆ getPosition() [2/2]
Get position. 
- Returns
 - position 
 
Definition at line 108 of file JPosition2D.hh.
  110       return static_cast<JPosition2D&>(*
this);
 
 
 
 
◆ setPosition()
  
  
      
        
          | void JGEOMETRY2D::JPosition2D::setPosition  | 
          ( | 
          const JVector2D &  | 
          pos | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Set position. 
- Parameters
 - 
  
  
 
Definition at line 119 of file JPosition2D.hh.
  121       static_cast<JVector2D&>(*
this) = pos;
 
 
 
 
◆ operator JAngle2D()
  
  
      
        
          | JGEOMETRY2D::JPosition2D::operator JAngle2D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - angle 
 
Definition at line 130 of file JPosition2D.hh.
 
 
◆ operator JVersor2D()
  
  
      
        
          | JGEOMETRY2D::JPosition2D::operator JVersor2D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - direction 
 
Definition at line 141 of file JPosition2D.hh.
 
 
◆ rotate()
Rotate. 
- Parameters
 - 
  
  
 
- Returns
 - this position 
 
Definition at line 153 of file JPosition2D.hh.
 
 
◆ rotate_back()
Rotate back. 
- Parameters
 - 
  
  
 
- Returns
 - this position 
 
Definition at line 167 of file JPosition2D.hh.
 
 
◆ getDot() [1/4]
  
  
      
        
          | double JGEOMETRY2D::JPosition2D::getDot  | 
          ( | 
          const JAngle2D &  | 
          angle | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 181 of file JPosition2D.hh.
 
 
◆ getDot() [2/4]
  
  
      
        
          | double JGEOMETRY2D::JPosition2D::getDot  | 
          ( | 
          const JVersor2D &  | 
          versor | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 195 of file JPosition2D.hh.
 
 
◆ getPerpDot() [1/4]
  
  
      
        
          | double JGEOMETRY2D::JPosition2D::getPerpDot  | 
          ( | 
          const JAngle2D &  | 
          angle | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get perpendicular dot product. 
- Parameters
 - 
  
  
 
- Returns
 - perpendicular dot product 
 
Definition at line 209 of file JPosition2D.hh.
 
 
◆ getPerpDot() [2/4]
  
  
      
        
          | double JGEOMETRY2D::JPosition2D::getPerpDot  | 
          ( | 
          const JVersor2D &  | 
          dir | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get perpendicular dot product. 
- Parameters
 - 
  
  
 
- Returns
 - perpendicular dot product 
 
Definition at line 223 of file JPosition2D.hh.
 
 
◆ getDot() [3/4]
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getDot | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 233 of file JVector2D.hh.
  236         getX() * point.getX() + 
 
  237         getY() * point.getY();
 
 
 
 
◆ getPerpDot() [3/4]
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getPerpDot | 
         
       
   | 
  
inline   | 
  
 
Get perpendicular dot product. 
- Parameters
 - 
  
  
 
- Returns
 - perpendicular dot product 
 
Definition at line 247 of file JVector2D.hh.
  250         getX() * point.getY() - 
 
  251         getY() * point.getX();
 
 
 
 
◆ transform() [1/2]
Transform. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 159 of file JVector2D.hh.
 
 
◆ getX()
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getX  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get x position. 
- Returns
 - x position 
 
Definition at line 62 of file JVector2D.hh.
 
 
◆ getY()
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getY  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get y position. 
- Returns
 - y position 
 
Definition at line 73 of file JVector2D.hh.
 
 
◆ negate()
  
  
      
        
          | JVector2D& JGEOMETRY2D::JVector2D::negate  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Negate vector. 
- Returns
 - this vector 
 
Definition at line 84 of file JVector2D.hh.
 
 
◆ add()
Add vector. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 99 of file JVector2D.hh.
 
 
◆ sub()
Subtract vector. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 114 of file JVector2D.hh.
 
 
◆ mul() [1/2]
  
  
      
        
          | JVector2D& JGEOMETRY2D::JVector2D::mul  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Scale vector. 
- Parameters
 - 
  
    | factor | multiplication factor  | 
  
   
- Returns
 - this vector 
 
Definition at line 129 of file JVector2D.hh.
 
 
◆ mul() [2/2]
Multiply with object. 
- Parameters
 - 
  
  
 
- Returns
 - result object 
 
Definition at line 273 of file JMath.hh.
 
 
◆ div()
  
  
      
        
          | JVector2D& JGEOMETRY2D::JVector2D::div  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Scale vector. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 144 of file JVector2D.hh.
 
 
◆ transform() [2/2]
Transform. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 159 of file JVector2D.hh.
 
 
◆ equals()
  
  
      
        
          | bool JGEOMETRY2D::JVector2D::equals  | 
          ( | 
          const JVector2D &  | 
          vector,  | 
         
        
           | 
           | 
          const double  | 
          precision = std::numeric_limits<double>::min()  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Check equality. 
- Parameters
 - 
  
  
 
- Returns
 - true if vectors are equal; else false 
 
Definition at line 173 of file JVector2D.hh.
  176       return (fabs(
getX() - vector.
getX()) <= precision &&
 
  177               fabs(
getY() - vector.
getY()) <= precision);
 
 
 
 
◆ getLengthSquared()
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getLengthSquared  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get length squared. 
- Returns
 - square of length 
 
Definition at line 186 of file JVector2D.hh.
 
 
◆ getLength()
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getLength  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
 
◆ getDistanceSquared()
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getDistanceSquared  | 
          ( | 
          const JVector2D &  | 
          point | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get squared of distance to point. 
- Parameters
 - 
  
  
 
- Returns
 - square of distance 
 
Definition at line 209 of file JVector2D.hh.
  211       return JVector2D(point).sub(*this).getLengthSquared();
 
 
 
 
◆ getDistance()
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getDistance  | 
          ( | 
          const JVector2D &  | 
          point | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get distance to point. 
- Parameters
 - 
  
  
 
- Returns
 - distance 
 
Definition at line 221 of file JVector2D.hh.
 
 
◆ getDot() [4/4]
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getDot  | 
          ( | 
          const JVector2D &  | 
          point | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 233 of file JVector2D.hh.
 
 
◆ getPerpDot() [4/4]
  
  
      
        
          | double JGEOMETRY2D::JVector2D::getPerpDot  | 
          ( | 
          const JVector2D &  | 
          point | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get perpendicular dot product. 
- Parameters
 - 
  
  
 
- Returns
 - perpendicular dot product 
 
Definition at line 247 of file JVector2D.hh.
 
 
◆ operator>> [1/2]
  
  
      
        
          | std::istream& operator>>  | 
          ( | 
          std::istream &  | 
          in,  | 
         
        
           | 
           | 
          JPosition2D &  | 
          position  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Read position from input. 
- Parameters
 - 
  
    | in | input stream  | 
    | position | position  | 
  
   
- Returns
 - input stream 
 
Definition at line 238 of file JPosition2D.hh.
  240       in >> position.
__x >> position.
__y;
 
 
 
 
◆ operator<< [1/2]
  
  
      
        
          | std::ostream& operator<<  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const JPosition2D &  | 
          position  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Write position to output. 
- Parameters
 - 
  
    | out | output stream  | 
    | position | position  | 
  
   
- Returns
 - output stream 
 
Definition at line 253 of file JPosition2D.hh.
  255       out << position.
getX() << 
' ' << position.
getY();
 
 
 
 
◆ operator>> [2/2]
Read position from input. 
- Parameters
 - 
  
    | in | reader  | 
    | position | position  | 
  
   
- Returns
 - reader 
 
Definition at line 268 of file JPosition2D.hh.
 
 
◆ operator<< [2/2]
Write position to output. 
- Parameters
 - 
  
    | out | writer  | 
    | position | position  | 
  
   
- Returns
 - writer 
 
Definition at line 284 of file JPosition2D.hh.
  286       out << position.
getX();
 
  287       out << position.
getY();
 
 
 
 
◆ __x
  
  
      
        
          | double JGEOMETRY2D::JVector2D::__x | 
         
       
   | 
  
protectedinherited   | 
  
 
 
◆ __y
  
  
      
        
          | double JGEOMETRY2D::JVector2D::__y | 
         
       
   | 
  
protectedinherited   | 
  
 
 
The documentation for this class was generated from the following file: