K3dVector2 Class Reference

#include <K3dVector2.h>

List of all members.

Public Member Functions

 K3dVector2 ()
 K3dVector2 (const float vector[2])
 K3dVector2 (float x, float y)
 ~K3dVector2 ()
 Destructor.
float * GetVector ()
int & GetId ()
 Get or set vector index in global data.
float & operator[] (int index)
float operator[] (int index) const
float GetScalar (const int index)
void SetScalar (const float fScalar, const int index)
void Set (K3dVector2 vec)
void Set (float vector[2])
void Set (float x, float y)
void SetX (const float fX)
void SetY (const float fY)
float & GetX ()
float & GetY ()
K3dVector2operator= (const K3dVector2 &rkV)
bool operator== (const K3dVector2 &rkV)
bool operator!= (const K3dVector2 &rkV)
bool operator< (const K3dVector2 &rkV)
bool operator<= (const K3dVector2 &rkV)
bool operator> (const K3dVector2 &rkV)
bool operator>= (const K3dVector2 &rkV)
int CompareArrays (const K3dVector2 &rkV)
K3dVector2 operator+ (const K3dVector2 &rkV)
K3dVector2 operator+ (float fScalar)
K3dVector2 operator- (K3dVector2 &rkVector)
K3dVector2 operator- (float fScalar)
K3dVector2 operator- ()
K3dVector2 operator * (K3dVector2 &rkVector)
K3dVector2 operator * (float fScalar)
K3dVector2 operator/ (K3dVector2 &rkVector)
K3dVector2 operator/ (float fScalar)
K3dVector2operator+= (const K3dVector2 &rkVector)
K3dVector2operator+= (float fScalar)
K3dVector2operator-= (const K3dVector2 &rkVector)
K3dVector2operator-= (float fScalar)
K3dVector2 operator *= (const K3dVector2 &rkVector)
K3dVector2 operator *= (float fScalar)
K3dVector2 operator/= (const K3dVector2 &rkVector)
K3dVector2 operator/= (float fScalar)
K3dVector2 Sqr ()
void Add (const K3dVector2 &vec)
void AddScalar (const float fScalar, const int index)
void SubtractScalar (const float fScalar, const int index)
void Reset ()
float Length ()
float SquaredLength ()
void Normalize ()
void VectorBetween (K3dVector2 &_rkVec_1, K3dVector2 &_rkVec_2)
void AddVector (K3dVector2 &_rkVec_1, K3dVector2 &_rkVec_2)
void DivideVector (K3dVector2 &_rkVec, float divider)
void Translate (const K3dVector2 &_rkVertex, const K3dVector2 &_rkDirectVec, const float distance)
void Invert ()
float Dot (const K3dVector2 &_rkV)
void Angle ()

Private Attributes

float m_afVector [2]
int m_iId
 2d vector index in global data


Detailed Description

Definition at line 47 of file K3dVector2.h.


Constructor & Destructor Documentation

K3dVector2::K3dVector2 (  ) 

Definition at line 37 of file K3dVector2.cpp.

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

K3dVector2::K3dVector2 ( const float  vector[2]  ) 

Definition at line 44 of file K3dVector2.cpp.

References m_afVector.

K3dVector2::K3dVector2 ( float  x,
float  y 
)

Definition at line 53 of file K3dVector2.cpp.

References m_afVector.

K3dVector2::~K3dVector2 (  ) 

Destructor.

Definition at line 62 of file K3dVector2.cpp.


Member Function Documentation

float * K3dVector2::GetVector (  )  [inline]

Definition at line 270 of file K3dVector2.h.

References m_afVector.

int& K3dVector2::GetId (  )  [inline]

Get or set vector index in global data.

Definition at line 71 of file K3dVector2.h.

References m_iId.

Referenced by K3dVector2Build::CreateNewVector2().

float & K3dVector2::operator[] ( int  index  )  [inline]

Definition at line 247 of file K3dVector2.h.

References m_afVector.

float K3dVector2::operator[] ( int  index  )  const [inline]

Definition at line 257 of file K3dVector2.h.

References m_afVector.

float K3dVector2::GetScalar ( const int  index  )  [inline]

Definition at line 278 of file K3dVector2.h.

References m_afVector.

void K3dVector2::SetScalar ( const float  fScalar,
const int  index 
) [inline]

Definition at line 292 of file K3dVector2.h.

References m_afVector.

void K3dVector2::Set ( K3dVector2  vec  )  [inline]

Definition at line 345 of file K3dVector2.h.

References m_afVector.

Referenced by operator/=().

void K3dVector2::Set ( float  vector[2]  )  [inline]

Definition at line 354 of file K3dVector2.h.

References m_afVector.

void K3dVector2::Set ( float  x,
float  y 
) [inline]

Definition at line 363 of file K3dVector2.h.

References m_afVector.

void K3dVector2::SetX ( const float  fX  )  [inline]

Definition at line 372 of file K3dVector2.h.

References m_afVector.

void K3dVector2::SetY ( const float  fY  )  [inline]

Definition at line 378 of file K3dVector2.h.

References m_afVector.

float& K3dVector2::GetX (  )  [inline]

Definition at line 92 of file K3dVector2.h.

References m_afVector.

float& K3dVector2::GetY (  )  [inline]

Definition at line 96 of file K3dVector2.h.

References m_afVector.

K3dVector2 & K3dVector2::operator= ( const K3dVector2 rkV  ) 

Definition at line 69 of file K3dVector2.cpp.

References m_afVector.

bool K3dVector2::operator== ( const K3dVector2 rkV  )  [inline]

Definition at line 204 of file K3dVector2.h.

References m_afVector.

bool K3dVector2::operator!= ( const K3dVector2 rkV  )  [inline]

Definition at line 211 of file K3dVector2.h.

References m_afVector.

bool K3dVector2::operator< ( const K3dVector2 rkV  )  [inline]

Definition at line 218 of file K3dVector2.h.

References CompareArrays().

bool K3dVector2::operator<= ( const K3dVector2 rkV  )  [inline]

Definition at line 225 of file K3dVector2.h.

References CompareArrays().

bool K3dVector2::operator> ( const K3dVector2 rkV  )  [inline]

Definition at line 232 of file K3dVector2.h.

References CompareArrays().

bool K3dVector2::operator>= ( const K3dVector2 rkV  )  [inline]

Definition at line 239 of file K3dVector2.h.

References CompareArrays().

int K3dVector2::CompareArrays ( const K3dVector2 rkV  ) 

Definition at line 328 of file K3dVector2.cpp.

References m_afVector.

Referenced by operator<(), operator<=(), operator>(), and operator>=().

K3dVector2 K3dVector2::operator+ ( const K3dVector2 rkV  ) 

Definition at line 83 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator+ ( float  fScalar  ) 

Definition at line 94 of file K3dVector2.cpp.

References K3dVector2(), and m_afVector.

K3dVector2 K3dVector2::operator- ( K3dVector2 rkVector  ) 

Definition at line 149 of file K3dVector2.cpp.

References K3dVector2(), and m_afVector.

K3dVector2 K3dVector2::operator- ( float  fScalar  ) 

Definition at line 163 of file K3dVector2.cpp.

References K3dVector2(), and m_afVector.

K3dVector2 K3dVector2::operator- (  ) 

Definition at line 176 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator * ( K3dVector2 rkVector  ) 

Definition at line 275 of file K3dVector2.cpp.

References K3dVector2(), and m_afVector.

K3dVector2 K3dVector2::operator * ( float  fScalar  ) 

Definition at line 189 of file K3dVector2.cpp.

References K3dVector2(), and m_afVector.

K3dVector2 K3dVector2::operator/ ( K3dVector2 rkVector  ) 

Definition at line 290 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator/ ( float  fScalar  ) 

Definition at line 311 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 & K3dVector2::operator+= ( const K3dVector2 rkVector  ) 

Definition at line 110 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 & K3dVector2::operator+= ( float  fScalar  ) 

Definition at line 123 of file K3dVector2.cpp.

References m_afVector.

K3dVector2& K3dVector2::operator-= ( const K3dVector2 rkVector  ) 

K3dVector2 & K3dVector2::operator-= ( float  fScalar  ) 

Definition at line 136 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator *= ( const K3dVector2 rkVector  ) 

Definition at line 204 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator *= ( float  fScalar  ) 

Definition at line 217 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator/= ( const K3dVector2 rkVector  ) 

Definition at line 230 of file K3dVector2.cpp.

References m_afVector.

K3dVector2 K3dVector2::operator/= ( float  fScalar  ) 

Definition at line 250 of file K3dVector2.cpp.

References m_afVector, and Set().

K3dVector2 K3dVector2::Sqr (  )  [inline]

Definition at line 448 of file K3dVector2.h.

void K3dVector2::Add ( const K3dVector2 vec  )  [inline]

Definition at line 385 of file K3dVector2.h.

References m_afVector.

void K3dVector2::AddScalar ( const float  fScalar,
const int  index 
) [inline]

Definition at line 394 of file K3dVector2.h.

References m_afVector.

void K3dVector2::SubtractScalar ( const float  fScalar,
const int  index 
) [inline]

Definition at line 407 of file K3dVector2.h.

References m_afVector.

void K3dVector2::Reset (  )  [inline]

Definition at line 337 of file K3dVector2.h.

References m_afVector.

float K3dVector2::Length (  )  [inline]

Definition at line 440 of file K3dVector2.h.

References m_afVector.

Referenced by Angle(), and Normalize().

float K3dVector2::SquaredLength (  ) 

Definition at line 348 of file K3dVector2.cpp.

References m_afVector.

void K3dVector2::Normalize (  )  [inline]

Definition at line 421 of file K3dVector2.h.

References Length(), and m_afVector.

void K3dVector2::VectorBetween ( K3dVector2 _rkVec_1,
K3dVector2 _rkVec_2 
) [inline]

Definition at line 463 of file K3dVector2.h.

References m_afVector.

void K3dVector2::AddVector ( K3dVector2 _rkVec_1,
K3dVector2 _rkVec_2 
) [inline]

Definition at line 472 of file K3dVector2.h.

References m_afVector.

void K3dVector2::DivideVector ( K3dVector2 _rkVec,
float  divider 
) [inline]

Definition at line 481 of file K3dVector2.h.

References m_afVector.

void K3dVector2::Translate ( const K3dVector2 _rkVertex,
const K3dVector2 _rkDirectVec,
const float  distance 
) [inline]

Definition at line 306 of file K3dVector2.h.

References m_afVector.

void K3dVector2::Invert (  )  [inline]

Definition at line 315 of file K3dVector2.h.

References m_afVector.

float K3dVector2::Dot ( const K3dVector2 _rkV  )  [inline]

Definition at line 325 of file K3dVector2.h.

References m_afVector.

void K3dVector2::Angle (  )  [inline]

Definition at line 497 of file K3dVector2.h.

References Length(), and m_afVector.


Member Data Documentation

float K3dVector2::m_afVector[2] [private]

Definition at line 50 of file K3dVector2.h.

Referenced by Add(), AddScalar(), AddVector(), Angle(), CompareArrays(), DivideVector(), Dot(), GetScalar(), GetVector(), GetX(), GetY(), Invert(), K3dVector2(), Length(), Normalize(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), operator[](), Reset(), Set(), SetScalar(), SetX(), SetY(), SquaredLength(), SubtractScalar(), Translate(), and VectorBetween().

int K3dVector2::m_iId [private]

2d vector index in global data

Definition at line 51 of file K3dVector2.h.

Referenced by GetId().


The documentation for this class was generated from the following files:
Generated on Thu Aug 16 23:53:34 2007 for K3dEngine by  doxygen 1.5.0