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

#include <gm_vec2.h>

Public Member Functions

 gmVector2 ()
 
 gmVector2 (const gmVector2 &)
 
 gmVector2 (double, double)
 
double & operator[] (int)
 
const double & operator[] (int) const
 
gmVector2assign (double, double)
 
gmVector2operator= (const gmVector2 &)
 
gmVector2operator+= (const gmVector2 &)
 
gmVector2operator-= (const gmVector2 &)
 
gmVector2operator*= (double)
 
gmVector2operator/= (double)
 
gmVector2 operator+ (const gmVector2 &) const
 
gmVector2 operator- (const gmVector2 &) const
 
gmVector2 operator- () const
 
gmVector2 operator* (double) const
 
gmVector2 operator/ (double) const
 
bool operator== (const gmVector2 &) const
 
bool operator!= (const gmVector2 &) const
 
gmVector2clamp (double, double)
 
double length () const
 
double lengthSquared () const
 
gmVector2normalize ()
 
void copyTo (float[2]) const
 
void copyTo (double[2]) const
 

Protected Attributes

double v_ [2]
 

Friends

gmVector2 operator* (double, const gmVector2 &)
 
double distance (const gmVector2 &, const gmVector2 &)
 
double distanceSquared (const gmVector2 &, const gmVector2 &)
 
double dot (const gmVector2 &, const gmVector2 &)
 
gmVector2 lerp (double, const gmVector2 &, const gmVector2 &)
 
ostream & operator<< (ostream &, const gmVector2 &)
 

Constructor & Destructor Documentation

gmVector2::gmVector2 ( )
inline
gmVector2::gmVector2 ( const gmVector2 v)
inline
gmVector2::gmVector2 ( double  x,
double  y 
)
inline

Member Function Documentation

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

Friends And Related Function Documentation

double distance ( const gmVector2 v1,
const gmVector2 v2 
)
friend
double distanceSquared ( const gmVector2 v1,
const gmVector2 v2 
)
friend
double dot ( const gmVector2 v1,
const gmVector2 v2 
)
friend
gmVector2 lerp ( double  f,
const gmVector2 v1,
const gmVector2 v2 
)
friend
gmVector2 operator* ( double  c,
const gmVector2 v 
)
friend
ostream& operator<< ( ostream &  os,
const gmVector2 v 
)
friend

Member Data Documentation

double gmVector2::v_[2]
protected

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