Vector2 Class Reference

#include <math/Vector2.h>

List of all members.

Public Member Functions

 Vector2 ()
 Vector2 (const Vector2 &right)
 Vector2 (const double x, const double y)
 ~Vector2 ()
double & operator[] (const unsigned int index)
Vector2 operator+ (const Vector2 &right) const
Vector2 operator- (const Vector2 &right) const
Vector2 & operator-= (const Vector2 &right)
Vector2 operator * (const double right) const
Vector2 operator/ (const double right) const
const double operator[] (const unsigned int index) const
double Magnitude () const
double MagSquared () const
double Dot (const Vector2 &right) const
Vector2 Cross (const Vector2 &right) const
Vector2 Projection (const Vector2 &right) const
double ProjectionMag (const Vector2 &right) const
void Reflect (const Vector2 &normal)
bool operator== (const Vector2 &right) const
bool operator< (const Vector2 &right) const
void Normalize ()
bool Compare (const Vector2 &right, const double &tol) const
bool operator!= (const Vector2 &right) const
Vector2 & operator+= (const Vector2 &right)
Vector2 & operator *= (const double right)
Vector2 & operator/= (const double right)
Vector2 operator- () const

Protected Attributes

double elements [2]


Detailed Description

Definition at line 9 of file Vector2.h.


Constructor & Destructor Documentation

Vector2::Vector2 (   ) 
 

Definition at line 7 of file Vector2.cpp.

References elements.

Referenced by operator *(), operator+(), operator-(), and operator/().

Vector2::Vector2 (  const Vector2 &  right  ) 
 

Definition at line 13 of file Vector2.cpp.

References elements.

Vector2::Vector2 (  const double  x,
const double  y
)  [inline]
 

Definition at line 134 of file Vector2.h.

References elements.

Vector2::~Vector2 (   )  [inline]
 

Definition at line 145 of file Vector2.h.


Member Function Documentation

bool Vector2::Compare (  const Vector2 &  right,
const double &  tol
)  const
 

Definition at line 136 of file Vector2.cpp.

References elements.

Vector2 Vector2::Cross (  const Vector2 &  right  )  const
 

Definition at line 74 of file Vector2.cpp.

References elements.

double Vector2::Dot (  const Vector2 &  right  )  const
 

Definition at line 66 of file Vector2.cpp.

References elements.

Referenced by ProjectionMag().

double Vector2::Magnitude (   )  const
 

Definition at line 56 of file Vector2.cpp.

References elements.

Referenced by Normalize().

double Vector2::MagSquared (   )  const
 

Definition at line 61 of file Vector2.cpp.

References elements.

void Vector2::Normalize (   ) 
 

Definition at line 152 of file Vector2.cpp.

References Magnitude().

Here is the call graph for this function:

Vector2 Vector2::operator * (  const double  right  )  const
 

Definition at line 42 of file Vector2.cpp.

References elements, and Vector2().

Here is the call graph for this function:

Vector2 & Vector2::operator *= (  const double  right  ) 
 

Definition at line 184 of file Vector2.cpp.

References elements.

bool Vector2::operator!= (  const Vector2 &  right  )  const
 

Definition at line 174 of file Vector2.cpp.

References operator==().

Here is the call graph for this function:

Vector2 Vector2::operator+ (  const Vector2 &  right  )  const
 

Definition at line 19 of file Vector2.cpp.

References elements, and Vector2().

Here is the call graph for this function:

Vector2 & Vector2::operator+= (  const Vector2 &  right  )  [inline]
 

Definition at line 122 of file Vector2.h.

References elements.

Vector2 Vector2::operator- (   )  const
 

Definition at line 214 of file Vector2.cpp.

References elements, and Vector2().

Here is the call graph for this function:

Vector2 Vector2::operator- (  const Vector2 &  right  )  const
 

Definition at line 26 of file Vector2.cpp.

References elements, and Vector2().

Here is the call graph for this function:

Vector2 & Vector2::operator-= (  const Vector2 &  right  ) 
 

Definition at line 34 of file Vector2.cpp.

References elements.

Vector2 Vector2::operator/ (  const double  right  )  const
 

Definition at line 49 of file Vector2.cpp.

References elements, and Vector2().

Here is the call graph for this function:

Vector2 & Vector2::operator/= (  const double  right  ) 
 

Definition at line 199 of file Vector2.cpp.

References elements.

bool Vector2::operator< (  const Vector2 &  right  )  const
 

Definition at line 168 of file Vector2.cpp.

bool Vector2::operator== (  const Vector2 &  right  )  const
 

Definition at line 114 of file Vector2.cpp.

Referenced by operator!=().

const double Vector2::operator[] (  const unsigned int  index  )  const [inline]
 

Definition at line 110 of file Vector2.h.

References elements, and IJG_Assert.

double & Vector2::operator[] (  const unsigned int  index  )  [inline]
 

Definition at line 103 of file Vector2.h.

References elements, and IJG_Assert.

Vector2 Vector2::Projection (  const Vector2 &  right  )  const
 

Definition at line 85 of file Vector2.cpp.

References ProjectionMag().

Referenced by Reflect().

Here is the call graph for this function:

double Vector2::ProjectionMag (  const Vector2 &  right  )  const
 

Definition at line 91 of file Vector2.cpp.

References Dot().

Referenced by Projection().

Here is the call graph for this function:

void Vector2::Reflect (  const Vector2 &  normal  ) 
 

Definition at line 108 of file Vector2.cpp.

References Projection().

Here is the call graph for this function:


Member Data Documentation

double Vector2::elements[2] [protected]
 

Definition at line 93 of file Vector2.h.

Referenced by Compare(), Cross(), Dot(), Magnitude(), MagSquared(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator[](), and Vector2().


The documentation for this class was generated from the following files:
Generated on Sat Apr 1 22:05:39 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO