Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Vec2 Class Reference

#include <Vector.h>

List of all members.

Public Member Functions

 Vec2 ()
 Vec2 (const float xy)
 Vec2 (const float xx, const float yy)
virtual ~Vec2 ()
float length ()
Vec2 normalize ()
Vec2 operator+ (const Vec2 &v)
Vec2 operator- (const Vec2 &v)
Vec2 operator- ()
Vec2 operator * (const float s)
Vec2 operator * (const Vec2 &v)
Vec2 operator/ (const float s)
Vec2 operator/ (const Vec2 &v)
void operator= (const Vec2 &v)
void operator+= (const Vec2 &v)
void operator-= (const Vec2 &v)
void operator *= (const float s)
void operator *= (const Vec2 &v)
void operator/= (const float s)
void operator/= (const Vec2 &v)
bool operator> (Vec2 &v)
bool operator== (const Vec2 &v)
bool operator!= (const Vec2 &v)
float & operator[] (const int index)
 operator const float * () const
 Vec2 ()
 Vec2 (const float xy)
 Vec2 (const float xx, const float yy)
virtual ~Vec2 ()
float length ()
Vec2 normalize ()
Vec2 operator+ (const Vec2 &v)
Vec2 operator- (const Vec2 &v)
Vec2 operator- ()
Vec2 operator * (const float s)
Vec2 operator * (const Vec2 &v)
Vec2 operator/ (const float s)
Vec2 operator/ (const Vec2 &v)
void operator= (const Vec2 &v)
void operator+= (const Vec2 &v)
void operator-= (const Vec2 &v)
void operator *= (const float s)
void operator *= (const Vec2 &v)
void operator/= (const float s)
void operator/= (const Vec2 &v)
bool operator> (Vec2 &v)
bool operator== (const Vec2 &v)
bool operator!= (const Vec2 &v)
float & operator[] (const int index)
 operator const float * () const

Public Attributes

float x
float y


Detailed Description

Vector.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 15 of file DeFacto/Math/Vector.h.


Constructor & Destructor Documentation

Vec2::Vec2  ) 
 

V2.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 16 of file DeFacto/Math/Vec2.cpp.

References x, and y.

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

Vec2::Vec2 const float  xy  ) 
 

Definition at line 23 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Vec2::Vec2 const float  xx,
const float  yy
 

Definition at line 30 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Vec2::~Vec2  )  [virtual]
 

Definition at line 38 of file DeFacto/Math/Vec2.cpp.

Vec2::Vec2  ) 
 

Vec2::Vec2 const float  xy  ) 
 

Vec2::Vec2 const float  xx,
const float  yy
 

virtual Vec2::~Vec2  )  [virtual]
 


Member Function Documentation

float Vec2::length  ) 
 

float Vec2::length  ) 
 

Definition at line 45 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Referenced by normalize(), and operator>().

Vec2 Vec2::normalize  ) 
 

Vec2 Vec2::normalize  ) 
 

Definition at line 52 of file DeFacto/Math/Vec2.cpp.

References length().

Here is the call graph for this function:

Vec2 Vec2::operator * const Vec2 v  ) 
 

Vec2 Vec2::operator * const float  s  ) 
 

Vec2 Vec2::operator * const Vec2 v  ) 
 

Definition at line 90 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

Vec2 Vec2::operator * const float  s  ) 
 

Definition at line 83 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

void Vec2::operator *= const Vec2 v  ) 
 

void Vec2::operator *= const float  s  ) 
 

void Vec2::operator *= const Vec2 v  ) 
 

Definition at line 154 of file DeFacto/Math/Vec2.cpp.

References x, and y.

void Vec2::operator *= const float  s  ) 
 

Definition at line 146 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Vec2::operator const float *  )  const [inline]
 

Definition at line 43 of file LevelCreator/Math/Vector.h.

References x.

Vec2::operator const float *  )  const [inline]
 

Definition at line 43 of file DeFacto/Math/Vector.h.

References x.

bool Vec2::operator!= const Vec2 v  ) 
 

bool Vec2::operator!= const Vec2 v  ) 
 

Definition at line 192 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Vec2 Vec2::operator+ const Vec2 v  ) 
 

Vec2 Vec2::operator+ const Vec2 v  ) 
 

Definition at line 62 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

void Vec2::operator+= const Vec2 v  ) 
 

void Vec2::operator+= const Vec2 v  ) 
 

Definition at line 130 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Vec2 Vec2::operator-  ) 
 

Vec2 Vec2::operator- const Vec2 v  ) 
 

Vec2 Vec2::operator-  ) 
 

Definition at line 76 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

Vec2 Vec2::operator- const Vec2 v  ) 
 

Definition at line 69 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

void Vec2::operator-= const Vec2 v  ) 
 

void Vec2::operator-= const Vec2 v  ) 
 

Definition at line 138 of file DeFacto/Math/Vec2.cpp.

References x, and y.

Vec2 Vec2::operator/ const Vec2 v  ) 
 

Vec2 Vec2::operator/ const float  s  ) 
 

Vec2 Vec2::operator/ const Vec2 v  ) 
 

Definition at line 115 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

Vec2 Vec2::operator/ const float  s  ) 
 

Vec2 Vec2::operator ^ (const Vec2 &v) { Vec2 u; u.x = (y*v.z) - (z*v.y); u.y = (z*v.x) - (x*v.z); u.z = (x*v.y) - (y*v.x); return u;

Definition at line 108 of file DeFacto/Math/Vec2.cpp.

References Vec2(), x, and y.

Here is the call graph for this function:

void Vec2::operator/= const Vec2 v  ) 
 

void Vec2::operator/= const float  s  ) 
 

void Vec2::operator/= const Vec2 v  ) 
 

Definition at line 170 of file DeFacto/Math/Vec2.cpp.

References x, and y.

void Vec2::operator/= const float  s  ) 
 

Definition at line 162 of file DeFacto/Math/Vec2.cpp.

References x, and y.

void Vec2::operator= const Vec2 v  ) 
 

void Vec2::operator= const Vec2 v  ) 
 

Definition at line 122 of file DeFacto/Math/Vec2.cpp.

References x, and y.

bool Vec2::operator== const Vec2 v  ) 
 

bool Vec2::operator== const Vec2 v  ) 
 

Definition at line 185 of file DeFacto/Math/Vec2.cpp.

References x, and y.

bool Vec2::operator> Vec2 v  ) 
 

bool Vec2::operator> Vec2 v  ) 
 

Definition at line 178 of file DeFacto/Math/Vec2.cpp.

References length().

Here is the call graph for this function:

float& Vec2::operator[] const int  index  )  [inline]
 

Definition at line 42 of file LevelCreator/Math/Vector.h.

References x.

float& Vec2::operator[] const int  index  )  [inline]
 

Definition at line 42 of file DeFacto/Math/Vector.h.

References x.


Member Data Documentation

float Vec2::x
 

Definition at line 46 of file LevelCreator/Math/Vector.h.

Referenced by OpenGLRenderer::changeShaderConstant2f(), dot(), Menu::drawCreate(), Menu::drawJoin(), Menu::drawSelect(), length(), operator *(), operator *=(), operator const float *(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), operator[](), Vec2(), and Vec4::Vec4().

float Vec2::y
 

Definition at line 46 of file LevelCreator/Math/Vector.h.

Referenced by OpenGLRenderer::changeShaderConstant2f(), dot(), Menu::drawCreate(), Menu::drawJoin(), Menu::drawSelect(), length(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), Vec2(), and Vec4::Vec4().


Generated on Sun Jun 5 15:51:09 2005 for Defacto by  doxygen 1.4.3