vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gmVector3 Class Reference

#include <gm_vec3.h>

Public Member Functions

 gmVector3 ()
 
 gmVector3 (const gmVector3 &)
 
 gmVector3 (double, double, double)
 
double & operator[] (int)
 
const double & operator[] (int) const
 
gmVector3assign (double, double, double)
 
gmVector3operator= (const gmVector3 &)
 
gmVector3operator+= (const gmVector3 &)
 
gmVector3operator-= (const gmVector3 &)
 
gmVector3operator*= (double)
 
gmVector3operator/= (double)
 
gmVector3 operator+ (const gmVector3 &) const
 
gmVector3 operator- (const gmVector3 &) const
 
gmVector3 operator- () const
 
gmVector3 operator* (double) const
 
gmVector3 operator/ (double) const
 
bool operator== (const gmVector3 &) const
 
bool operator!= (const gmVector3 &) const
 
gmVector3clamp (double, double)
 
double length () const
 
double lengthSquared () const
 
gmVector3normalize ()
 
bool isZero ()
 
void copyTo (float[3]) const
 
void copyTo (double[3]) const
 
void float2double (const float *v)
 
void double2float (const double *v)
 

Protected Attributes

double v_ [3]
 

Friends

gmVector3 operator* (double, const gmVector3 &)
 
gmVector3 cross (const gmVector3 &, const gmVector3 &)
 
double distance (const gmVector3 &, const gmVector3 &)
 
double distanceSquared (const gmVector3 &, const gmVector3 &)
 
double dot (const gmVector3 &, const gmVector3 &)
 
gmVector3 lerp (double, const gmVector3 &, const gmVector3 &)
 
double plane_intersect (const gmVector3 &, const gmVector3 &, const gmVector3 &, const gmVector3 &)
 
double line_distance (const gmVector3 &, const gmVector3 &, const gmVector3 &, const gmVector3 &)
 
double plane_distance (const gmVector3 &, const gmVector3 &, const gmVector3 &)
 
ostream & operator<< (ostream &, const gmVector3 &)
 

Constructor & Destructor Documentation

gmVector3::gmVector3 ( )
inline
gmVector3::gmVector3 ( const gmVector3 v)
inline
gmVector3::gmVector3 ( double  x,
double  y,
double  z 
)
inline

Member Function Documentation

gmVector3 & gmVector3::assign ( double  x,
double  y,
double  z 
)
inline
gmVector3 & gmVector3::clamp ( double  lo,
double  hi 
)
inline
void gmVector3::copyTo ( float  f[3]) const
inline
void gmVector3::copyTo ( double  f[3]) const
inline
void gmVector3::double2float ( const double *  v)
inline
void gmVector3::float2double ( const float *  v)
inline
bool gmVector3::isZero ( )
inline
double gmVector3::length ( ) const
inline
double gmVector3::lengthSquared ( ) const
inline
gmVector3 & gmVector3::normalize ( )
inline
bool gmVector3::operator!= ( const gmVector3 v) const
inline
gmVector3 gmVector3::operator* ( double  c) const
inline
gmVector3 & gmVector3::operator*= ( double  c)
inline
gmVector3 gmVector3::operator+ ( const gmVector3 v) const
inline
gmVector3 & gmVector3::operator+= ( const gmVector3 v)
inline
gmVector3 gmVector3::operator- ( const gmVector3 v) const
inline
gmVector3 gmVector3::operator- ( ) const
inline
gmVector3 & gmVector3::operator-= ( const gmVector3 v)
inline
gmVector3 gmVector3::operator/ ( double  c) const
inline
gmVector3 & gmVector3::operator/= ( double  c)
inline
gmVector3 & gmVector3::operator= ( const gmVector3 v)
inline
bool gmVector3::operator== ( const gmVector3 v) const
inline
double & gmVector3::operator[] ( int  i)
inline
const double & gmVector3::operator[] ( int  i) const
inline

Friends And Related Function Documentation

gmVector3 cross ( const gmVector3 v1,
const gmVector3 v2 
)
friend
double distance ( const gmVector3 v1,
const gmVector3 v2 
)
friend
double distanceSquared ( const gmVector3 v1,
const gmVector3 v2 
)
friend
double dot ( const gmVector3 v1,
const gmVector3 v2 
)
friend
gmVector3 lerp ( double  f,
const gmVector3 v1,
const gmVector3 v2 
)
friend
double line_distance ( const gmVector3 p1,
const gmVector3 v1,
const gmVector3 p2,
const gmVector3 v2 
)
friend
gmVector3 operator* ( double  c,
const gmVector3 v 
)
friend
ostream& operator<< ( ostream &  os,
const gmVector3 v 
)
friend
double plane_distance ( const gmVector3 p,
const gmVector3 plane_p,
const gmVector3 plane_norm 
)
friend
double plane_intersect ( const gmVector3 p,
const gmVector3 v,
const gmVector3 plane_p,
const gmVector3 plane_norm 
)
friend

Member Data Documentation

double gmVector3::v_[3]
protected

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