#include <K3dVector2.h>
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 () |
K3dVector2 & | 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) |
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) |
K3dVector2 & | operator+= (const K3dVector2 &rkVector) |
K3dVector2 & | operator+= (float fScalar) |
K3dVector2 & | operator-= (const K3dVector2 &rkVector) |
K3dVector2 & | operator-= (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 |
Definition at line 47 of file K3dVector2.h.
K3dVector2::K3dVector2 | ( | ) |
Definition at line 37 of file K3dVector2.cpp.
Referenced by operator *(), operator+(), and operator-().
K3dVector2::K3dVector2 | ( | const float | vector[2] | ) |
K3dVector2::K3dVector2 | ( | float | x, | |
float | y | |||
) |
K3dVector2::~K3dVector2 | ( | ) |
float * K3dVector2::GetVector | ( | ) | [inline] |
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] |
float K3dVector2::operator[] | ( | int | index | ) | const [inline] |
float K3dVector2::GetScalar | ( | const int | index | ) | [inline] |
void K3dVector2::SetScalar | ( | const float | fScalar, | |
const int | index | |||
) | [inline] |
void K3dVector2::Set | ( | K3dVector2 | vec | ) | [inline] |
void K3dVector2::Set | ( | float | vector[2] | ) | [inline] |
void K3dVector2::Set | ( | float | x, | |
float | y | |||
) | [inline] |
void K3dVector2::SetX | ( | const float | fX | ) | [inline] |
void K3dVector2::SetY | ( | const float | fY | ) | [inline] |
float& K3dVector2::GetX | ( | ) | [inline] |
float& K3dVector2::GetY | ( | ) | [inline] |
K3dVector2 & K3dVector2::operator= | ( | const K3dVector2 & | rkV | ) |
bool K3dVector2::operator== | ( | const K3dVector2 & | rkV | ) | [inline] |
bool K3dVector2::operator!= | ( | const K3dVector2 & | rkV | ) | [inline] |
bool K3dVector2::operator< | ( | const K3dVector2 & | rkV | ) | [inline] |
bool K3dVector2::operator<= | ( | const K3dVector2 & | rkV | ) | [inline] |
bool K3dVector2::operator> | ( | const K3dVector2 & | rkV | ) | [inline] |
bool K3dVector2::operator>= | ( | const K3dVector2 & | rkV | ) | [inline] |
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 | ) |
K3dVector2 K3dVector2::operator+ | ( | float | fScalar | ) |
K3dVector2 K3dVector2::operator- | ( | K3dVector2 & | rkVector | ) |
K3dVector2 K3dVector2::operator- | ( | float | fScalar | ) |
K3dVector2 K3dVector2::operator- | ( | ) |
K3dVector2 K3dVector2::operator * | ( | K3dVector2 & | rkVector | ) |
K3dVector2 K3dVector2::operator * | ( | float | fScalar | ) |
K3dVector2 K3dVector2::operator/ | ( | K3dVector2 & | rkVector | ) |
K3dVector2 K3dVector2::operator/ | ( | float | fScalar | ) |
K3dVector2 & K3dVector2::operator+= | ( | const K3dVector2 & | rkVector | ) |
K3dVector2 & K3dVector2::operator+= | ( | float | fScalar | ) |
K3dVector2& K3dVector2::operator-= | ( | const K3dVector2 & | rkVector | ) |
K3dVector2 & K3dVector2::operator-= | ( | float | fScalar | ) |
K3dVector2 K3dVector2::operator *= | ( | const K3dVector2 & | rkVector | ) |
K3dVector2 K3dVector2::operator *= | ( | float | fScalar | ) |
K3dVector2 K3dVector2::operator/= | ( | const K3dVector2 & | rkVector | ) |
K3dVector2 K3dVector2::operator/= | ( | float | fScalar | ) |
K3dVector2 K3dVector2::Sqr | ( | ) | [inline] |
Definition at line 448 of file K3dVector2.h.
void K3dVector2::Add | ( | const K3dVector2 & | vec | ) | [inline] |
void K3dVector2::AddScalar | ( | const float | fScalar, | |
const int | index | |||
) | [inline] |
void K3dVector2::SubtractScalar | ( | const float | fScalar, | |
const int | index | |||
) | [inline] |
void K3dVector2::Reset | ( | ) | [inline] |
float K3dVector2::Length | ( | ) | [inline] |
Definition at line 440 of file K3dVector2.h.
References m_afVector.
Referenced by Angle(), and Normalize().
float K3dVector2::SquaredLength | ( | ) |
void K3dVector2::Normalize | ( | ) | [inline] |
void K3dVector2::VectorBetween | ( | K3dVector2 & | _rkVec_1, | |
K3dVector2 & | _rkVec_2 | |||
) | [inline] |
void K3dVector2::AddVector | ( | K3dVector2 & | _rkVec_1, | |
K3dVector2 & | _rkVec_2 | |||
) | [inline] |
void K3dVector2::DivideVector | ( | K3dVector2 & | _rkVec, | |
float | divider | |||
) | [inline] |
void K3dVector2::Translate | ( | const K3dVector2 & | _rkVertex, | |
const K3dVector2 & | _rkDirectVec, | |||
const float | distance | |||
) | [inline] |
void K3dVector2::Invert | ( | ) | [inline] |
float K3dVector2::Dot | ( | const K3dVector2 & | _rkV | ) | [inline] |
void K3dVector2::Angle | ( | ) | [inline] |
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] |