#include <K3dVector3.h>
Inheritance diagram for K3dVector3:
Public Member Functions | |
K3dVector3 () | |
K3dVector3 (const K3dVector3 &_rkV) | |
K3dVector3 (const float afVector[3]) | |
K3dVector3 (float x, float y, float z) | |
K3dVector3 (const unsigned char aucVector[3]) | |
~K3dVector3 () | |
float * | GetVectorArray () |
const float * | GetVectorArray () const |
K3dVector3 & | GetVector () |
const K3dVector3 & | GetVector () const |
void | Set (K3dVector3 &_rV) |
Set vector from another vector. | |
void | Set (float vector[3]) |
Set vector x,y,z coordinates from array. | |
void | Set (float x, float y, float z) |
Set vector from (x, y, z) values. | |
void | SetX (const float fX) |
Set X value. | |
void | SetY (const float fY) |
Set Y value. | |
void | SetZ (const float fZ) |
Set Z value. | |
float & | GetX () |
Get X value. | |
const float & | GetX () const |
float & | GetY () |
Get Y value. | |
const float & | GetY () const |
float & | GetZ () |
Get Z value. | |
const float & | GetZ () const |
float | GetScalar (const int index) |
Get scalar by index. | |
void | SetScalar (const float fScalar, const int index) |
Set scalar by index. | |
void | Reset () |
float & | operator[] (int index) |
const float & | operator[] (int index) const |
K3dVector3 & | operator= (const K3dVector3 &_rkV) |
bool | operator== (const K3dVector3 &_rkV) const |
bool | operator== (const K3dVector3 &_rkV) |
bool | operator!= (const K3dVector3 &_rkV) const |
bool | operator< (const K3dVector3 &_rkV) const |
bool | operator<= (const K3dVector3 &_rkV) const |
bool | operator> (const K3dVector3 &_rkV) const |
bool | operator>= (const K3dVector3 &_rkV) const |
int | CompareArrays (const K3dVector3 &_rkV) const |
K3dVector3 | operator+ (const K3dVector3 &_rkV) const |
K3dVector3 | operator+ (const float fScalar) const |
K3dVector3 | operator- (const K3dVector3 &_rkVector) const |
K3dVector3 | operator- (const float fScalar) const |
K3dVector3 | operator- () const |
K3dVector3 | operator * (const K3dVector3 &_rkVector) const |
K3dVector3 | operator * (const float fScalar) const |
K3dVector3 | operator/ (const K3dVector3 &_rkVector) const |
K3dVector3 | operator/ (const float fScalar) const |
K3dVector3 & | operator+= (const K3dVector3 &_rkVector) |
K3dVector3 & | operator+= (const float fScalar) |
K3dVector3 & | operator-= (const K3dVector3 &_rkVector) |
K3dVector3 & | operator-= (const float fScalar) |
K3dVector3 | operator *= (const K3dVector3 &_rkVector) |
K3dVector3 | operator *= (const float fScalar) |
K3dVector3 | operator/= (const K3dVector3 &_rkVector) |
K3dVector3 | operator/= (const float fScalar) |
Private Attributes | |
float | m_afVector [3] |
X,Y,Z vector. |
Definition at line 53 of file K3dVector3.h.
K3dVector3::K3dVector3 | ( | ) |
Definition at line 38 of file K3dVector3.cpp.
References Reset().
Referenced by operator *(), operator+(), and operator-().
K3dVector3::K3dVector3 | ( | const K3dVector3 & | _rkV | ) |
K3dVector3::K3dVector3 | ( | const float | afVector[3] | ) |
K3dVector3::K3dVector3 | ( | float | x, | |
float | y, | |||
float | z | |||
) |
K3dVector3::K3dVector3 | ( | const unsigned char | aucVector[3] | ) |
K3dVector3::~K3dVector3 | ( | ) |
float* K3dVector3::GetVectorArray | ( | ) | [inline] |
Definition at line 69 of file K3dVector3.h.
References m_afVector.
Referenced by K3dFontBmp::Print().
const float* K3dVector3::GetVectorArray | ( | ) | const [inline] |
K3dVector3& K3dVector3::GetVector | ( | ) | [inline] |
Definition at line 77 of file K3dVector3.h.
Referenced by K3dVector3Obj::CompareArrays(), K3dVector3Obj::K3dVector3Obj(), K3dVector3Obj::operator *(), K3dVector3Obj::operator *=(), K3dVector3Obj::operator+(), K3dVector3Obj::operator+=(), K3dVector3Obj::operator-(), K3dVector3Obj::operator-=(), K3dVector3Obj::operator/(), K3dVector3Obj::operator/=(), K3dVector3Obj::operator=(), and K3dVector3Work::SquaredLength().
const K3dVector3& K3dVector3::GetVector | ( | ) | const [inline] |
Definition at line 82 of file K3dVector3.h.
void K3dVector3::Set | ( | K3dVector3 & | _rV | ) | [inline] |
Set vector from another vector.
Definition at line 300 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCamera::ChangeMatrix(), K3dBoxBuild::CreateSceneBox(), K3dFontBmp::DrawCameraPosition(), K3dFontBmp::DrawFps(), K3dFontBmp::DrawNumFaces(), K3dFontBmp::DrawValue(), K3dMatrix::GetVector(), K3dCamera::Init(), operator/=(), K3dVector3Work::Projection(), K3dVorBsp::SetPlane(), and K3dCamera::SetStrafeDirection().
void K3dVector3::Set | ( | float | vector[3] | ) | [inline] |
Set vector x,y,z coordinates from array.
Definition at line 266 of file K3dVector3.h.
References m_afVector.
void K3dVector3::Set | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
Set vector from (x, y, z) values.
Definition at line 274 of file K3dVector3.h.
References m_afVector.
void K3dVector3::SetX | ( | const float | fX | ) | [inline] |
Set X value.
Definition at line 282 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCamera::ChangeMatrix(), and K3dCamera::SetStrafeDirection().
void K3dVector3::SetY | ( | const float | fY | ) | [inline] |
Set Y value.
Definition at line 288 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCamera::ChangeMatrix(), and K3dCamera::SetStrafeDirection().
void K3dVector3::SetZ | ( | const float | fZ | ) | [inline] |
Set Z value.
Definition at line 294 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCamera::ChangeMatrix(), and K3dCamera::SetStrafeDirection().
float& K3dVector3::GetX | ( | ) | [inline] |
Get X value.
Definition at line 94 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCutPoly::AddNewPlane(), K3dVM::AddVertex(), K3dVector3Work::Angle(), K3dFaceWork::CalcCentre(), K3dPlaneWork::CheckPlane(), K3dFontBmp::DrawValue(), K3dVector3Obj::K3dVector3Obj(), K3dVector3Work::Length(), K3dSphereWork::MoveByMouse(), K3dVector3Work::Normalize(), K3dVector3Obj::operator!=(), K3dVector3Obj::operator==(), operator==(), K3dMatrix::Rotation(), K3dMatrix::RotationGL(), K3dVM::SetLine(), K3dVM::SetRay(), K3dVM::SetVertexPos(), and K3dVector3Work::UnitLength().
const float& K3dVector3::GetX | ( | ) | const [inline] |
float& K3dVector3::GetY | ( | ) | [inline] |
Get Y value.
Definition at line 103 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCutPoly::AddNewPlane(), K3dVM::AddVertex(), K3dVector3Work::Angle(), K3dFaceWork::CalcCentre(), K3dPlaneWork::CheckPlane(), K3dFontBmp::DrawValue(), K3dVector3Obj::K3dVector3Obj(), K3dVector3Work::Length(), K3dSphereWork::MoveByMouse(), K3dVector3Work::Normalize(), K3dVector3Obj::operator!=(), K3dVector3Obj::operator==(), operator==(), K3dMatrix::Rotation(), K3dMatrix::RotationGL(), K3dVM::SetLine(), K3dVM::SetRay(), K3dVM::SetVertexPos(), and K3dVector3Work::UnitLength().
const float& K3dVector3::GetY | ( | ) | const [inline] |
float& K3dVector3::GetZ | ( | ) | [inline] |
Get Z value.
Definition at line 112 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCutPoly::AddNewPlane(), K3dVM::AddVertex(), K3dFaceWork::CalcCentre(), K3dPlaneWork::CheckPlane(), K3dFontBmp::DrawValue(), K3dVector3Obj::K3dVector3Obj(), K3dVector3Work::Length(), K3dSphereWork::MoveByMouse(), K3dVector3Work::Normalize(), K3dVector3Obj::operator!=(), K3dVector3Obj::operator==(), operator==(), K3dMatrix::Rotation(), K3dMatrix::RotationGL(), K3dVM::SetLine(), K3dVM::SetRay(), K3dVM::SetVertexPos(), and K3dVector3Work::UnitLength().
const float& K3dVector3::GetZ | ( | ) | const [inline] |
float K3dVector3::GetScalar | ( | const int | index | ) | [inline] |
Get scalar by index.
Definition at line 244 of file K3dVector3.h.
References m_afVector.
Referenced by K3dCamera::GoBackward(), K3dCamera::GoForward(), and K3dCamera::Move().
void K3dVector3::SetScalar | ( | const float | fScalar, | |
const int | index | |||
) | [inline] |
void K3dVector3::Reset | ( | ) |
Definition at line 77 of file K3dVector3.cpp.
References m_afVector.
Referenced by K3dVector3Work::CalcVectorArrayCentre(), K3dVorBsp::CalcVertexArrayCentre(), K3dCamera::ChangeMatrix(), K3dBlock::K3dBlock(), K3dTestVertex::K3dTestVertex(), K3dVector3(), K3dIntrLinePlane::LinePlane(), K3dIntersection::LineTriangle(), K3dIntersection::RayPlane(), K3dIntersection::RayTriangle(), K3dVertex::Reset(), K3dPlane::Reset(), K3dTriangulation::SortVector3ArrayByAngle(), and ~K3dVector3().
float & K3dVector3::operator[] | ( | int | index | ) | [inline] |
const float & K3dVector3::operator[] | ( | int | index | ) | const [inline] |
K3dVector3 & K3dVector3::operator= | ( | const K3dVector3 & | _rkV | ) |
bool K3dVector3::operator== | ( | const K3dVector3 & | _rkV | ) | const |
Definition at line 279 of file K3dVector3.cpp.
References K3dMath::EqualRange(), GetX(), GetY(), GetZ(), and K_EQUAL_RANGE.
bool K3dVector3::operator== | ( | const K3dVector3 & | _rkV | ) |
Definition at line 297 of file K3dVector3.cpp.
References K3dMath::EqualRange(), GetX(), GetY(), GetZ(), and K_EQUAL_RANGE.
bool K3dVector3::operator!= | ( | const K3dVector3 & | _rkV | ) | const [inline] |
bool K3dVector3::operator< | ( | const K3dVector3 & | _rkV | ) | const [inline] |
bool K3dVector3::operator<= | ( | const K3dVector3 & | _rkV | ) | const [inline] |
bool K3dVector3::operator> | ( | const K3dVector3 & | _rkV | ) | const [inline] |
bool K3dVector3::operator>= | ( | const K3dVector3 & | _rkV | ) | const [inline] |
int K3dVector3::CompareArrays | ( | const K3dVector3 & | _rkV | ) | const |
Definition at line 262 of file K3dVector3.cpp.
References m_afVector.
Referenced by operator<(), operator<=(), operator>(), and operator>=().
K3dVector3 K3dVector3::operator+ | ( | const K3dVector3 & | _rkV | ) | const |
K3dVector3 K3dVector3::operator+ | ( | const float | fScalar | ) | const |
Reimplemented in K3dVector3Obj.
Definition at line 99 of file K3dVector3.cpp.
References K3dVector3(), and m_afVector.
K3dVector3 K3dVector3::operator- | ( | const K3dVector3 & | _rkVector | ) | const |
K3dVector3 K3dVector3::operator- | ( | const float | fScalar | ) | const |
Reimplemented in K3dVector3Obj.
Definition at line 159 of file K3dVector3.cpp.
References K3dVector3(), and m_afVector.
K3dVector3 K3dVector3::operator- | ( | ) | const |
Reimplemented in K3dVector3Obj.
Definition at line 170 of file K3dVector3.cpp.
References m_afVector.
K3dVector3 K3dVector3::operator * | ( | const K3dVector3 & | _rkVector | ) | const |
K3dVector3 K3dVector3::operator * | ( | const float | fScalar | ) | const |
Reimplemented in K3dVector3Obj.
Definition at line 178 of file K3dVector3.cpp.
References K3dVector3(), and m_afVector.
K3dVector3 K3dVector3::operator/ | ( | const K3dVector3 & | _rkVector | ) | const |
K3dVector3 K3dVector3::operator/ | ( | const float | fScalar | ) | const |
Reimplemented in K3dVector3Obj.
Definition at line 247 of file K3dVector3.cpp.
References m_afVector.
K3dVector3 & K3dVector3::operator+= | ( | const K3dVector3 & | _rkVector | ) |
K3dVector3 & K3dVector3::operator+= | ( | const float | fScalar | ) |
Reimplemented in K3dVector3Obj.
Definition at line 120 of file K3dVector3.cpp.
References m_afVector.
K3dVector3 & K3dVector3::operator-= | ( | const K3dVector3 & | _rkVector | ) |
K3dVector3 & K3dVector3::operator-= | ( | const float | fScalar | ) |
Reimplemented in K3dVector3Obj.
Definition at line 130 of file K3dVector3.cpp.
References m_afVector.
K3dVector3 K3dVector3::operator *= | ( | const K3dVector3 & | _rkVector | ) |
K3dVector3 K3dVector3::operator *= | ( | const float | fScalar | ) |
Reimplemented in K3dVector3Obj.
Definition at line 198 of file K3dVector3.cpp.
References m_afVector.
K3dVector3 K3dVector3::operator/= | ( | const K3dVector3 & | _rkVector | ) |
K3dVector3 K3dVector3::operator/= | ( | const float | fScalar | ) | [inline] |
Reimplemented in K3dVector3Obj.
Definition at line 204 of file K3dVector3.h.
References m_afVector, and Set().
float K3dVector3::m_afVector[3] [private] |
X,Y,Z vector.
Definition at line 55 of file K3dVector3.h.
Referenced by CompareArrays(), GetScalar(), GetVectorArray(), GetX(), GetY(), GetZ(), K3dVector3(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator[](), Reset(), Set(), SetScalar(), SetX(), SetY(), and SetZ().