RayZaler 0.1
The free opto-mechanical simulation framework
RZ::Vec3 Struct Reference

Public Member Functions

 Vec3 (Real x, Real y, Real z)
 
 Vec3 (const Real coords[3])
 
Real operator* (Vec3 const &v) const
 
Vec3 operator+ (Vec3 const &v) const
 
Vec3 operator- (Vec3 const &v) const
 
Vec3 operator* (Real k) const
 
Vec3 operator/ (Real k) const
 
Vec3operator+= (const Vec3 &vec)
 
Vec3operator-= (const Vec3 &vec)
 
Vec3 cross (Vec3 const &v) const
 
Real norm () const
 
Vec3 normalized () const
 
bool isNull (Real tol=1e-9) const
 
bool compare (Vec3 const &other, Real dist) const
 
bool compare (Vec3 const &other) const
 
bool operator== (Vec3 const &other) const
 
bool operator!= (Vec3 const &other) const
 
Vec3 operator- () const
 
void copyToArray (Real *dest) const
 
void setFromArray (const Real *coords)
 
std::string toString () const
 
Vec3operator= (RZ::Real v)
 

Static Public Member Functions

static Vec3 zero ()
 
static Vec3 eX ()
 
static Vec3 eY ()
 
static Vec3 eZ ()
 

Public Attributes

union {
   struct {
      Real   x
 
      Real   y
 
      Real   z
 
   } 
 
   Real   coords [3]
 
}; 
 

The documentation for this struct was generated from the following file: