Data structure for vector in three dimensions.  
 More...
#include <JVector3D.hh>
Data structure for vector in three dimensions. 
This class implements the JMATH::JMath interface. 
Definition at line 34 of file JVector3D.hh.
 
◆ JVector3D() [1/3]
  
  
      
        
          | JGEOMETRY3D::JVector3D::JVector3D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JVector3D() [2/3]
  
  
      
        
          | JGEOMETRY3D::JVector3D::JVector3D  | 
          ( | 
          const double  | 
          x,  | 
         
        
           | 
           | 
          const double  | 
          y,  | 
         
        
           | 
           | 
          const double  | 
          z  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | x | x value  | 
    | y | y value  | 
    | z | z value  | 
  
   
Definition at line 55 of file JVector3D.hh.
 
 
◆ JVector3D() [3/3]
  
  
      
        
          | JGEOMETRY3D::JVector3D::JVector3D  | 
          ( | 
          const JVector2D &  | 
          vector,  | 
         
        
           | 
           | 
          const double  | 
          z  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | vector | (x,y) values  | 
    | z | z value  | 
  
   
Definition at line 70 of file JVector3D.hh.
 
 
◆ operator JVector2D()
  
  
      
        
          | JGEOMETRY3D::JVector3D::operator JVector2D  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - JVector2D 
 
Definition at line 83 of file JVector3D.hh.
   85       return JVector2D(this->
getX(), this->
getY());
 
double getY() const
Get y position.
 
double getX() const
Get x position.
 
 
 
 
◆ getX()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getX  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get x position. 
- Returns
 - x position 
 
Definition at line 94 of file JVector3D.hh.
 
 
◆ getY()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getY  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get y position. 
- Returns
 - y position 
 
Definition at line 104 of file JVector3D.hh.
 
 
◆ getZ()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getZ  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get z position. 
- Returns
 - z position 
 
Definition at line 115 of file JVector3D.hh.
 
 
◆ negate()
  
  
      
        
          | JVector3D& JGEOMETRY3D::JVector3D::negate  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Negate vector. 
- Returns
 - this vector 
 
Definition at line 126 of file JVector3D.hh.
 
 
◆ add()
Add vector. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 142 of file JVector3D.hh.
double getZ() const
Get z position.
 
 
 
 
◆ sub()
Subtract vector. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 158 of file JVector3D.hh.
 
 
◆ mul() [1/2]
  
  
      
        
          | JVector3D& JGEOMETRY3D::JVector3D::mul  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Scale vector. 
- Parameters
 - 
  
    | factor | multiplication factor  | 
  
   
- Returns
 - this vector 
 
Definition at line 174 of file JVector3D.hh.
 
 
◆ div()
  
  
      
        
          | JVector3D& JGEOMETRY3D::JVector3D::div  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Scale vector. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 190 of file JVector3D.hh.
 
 
◆ transform()
Transform. 
- Parameters
 - 
  
  
 
- Returns
 - this vector 
 
Definition at line 206 of file JVector3D.hh.
 
 
◆ equals()
  
  
      
        
          | bool JGEOMETRY3D::JVector3D::equals  | 
          ( | 
          const JVector3D &  | 
          vector,  | 
         
        
           | 
           | 
          const double  | 
          precision = std::numeric_limits<double>::min()  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
Check equality. 
- Parameters
 - 
  
    | vector | vector  | 
    | precision | precision  | 
  
   
- Returns
 - true if vectors are equal; else false 
 
Definition at line 221 of file JVector3D.hh.
  224       return (fabs(
getX() - vector.
getX()) <= precision &&
 
  225               fabs(
getY() - vector.
getY()) <= precision &&
 
  226               fabs(
getZ() - vector.
getZ()) <= precision);
 
 
 
 
◆ getLengthSquared()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getLengthSquared  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get length squared. 
- Returns
 - square of length 
 
Definition at line 235 of file JVector3D.hh.
 
 
◆ getLength()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getLength  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get length. 
- Returns
 - length 
 
Definition at line 246 of file JVector3D.hh.
double getLengthSquared() const
Get length squared.
 
 
 
 
◆ getDistanceSquared()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getDistanceSquared  | 
          ( | 
          const JVector3D &  | 
          pos | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get squared of distance to point. 
- Parameters
 - 
  
  
 
- Returns
 - square of distance 
 
Definition at line 258 of file JVector3D.hh.
  260       return JVector3D(pos).sub(*this).getLengthSquared();
 
JVector3D()
Default constructor.
 
 
 
 
◆ getDistance()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getDistance  | 
          ( | 
          const JVector3D &  | 
          pos | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get distance to point. 
- Parameters
 - 
  
  
 
- Returns
 - distance 
 
Definition at line 270 of file JVector3D.hh.
double getDistanceSquared(const JVector3D &pos) const
Get squared of distance to point.
 
 
 
 
◆ getDot()
  
  
      
        
          | double JGEOMETRY3D::JVector3D::getDot  | 
          ( | 
          const JVector3D &  | 
          vector | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 282 of file JVector3D.hh.
 
 
◆ getCross()
Get cross product. 
Note that this vector should not overlap with the first or second vector,
- Parameters
 - 
  
    | first | first vector  | 
    | second | second vector  | 
  
   
- Returns
 - this vector 
 
Definition at line 299 of file JVector3D.hh.
 
 
◆ mul() [2/2]
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);
 
 
 
 
◆ __x
  
  
      
        
          | double JGEOMETRY3D::JVector3D::__x | 
         
       
   | 
  
protected   | 
  
 
 
◆ __y
  
  
      
        
          | double JGEOMETRY3D::JVector3D::__y | 
         
       
   | 
  
protected   | 
  
 
 
◆ __z
  
  
      
        
          | double JGEOMETRY3D::JVector3D::__z | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: