#include <MercuryTypes.h>
Public Member Functions | |
MercuryPoint () | |
MercuryPoint (float ix, float iy, float iz) | |
MercuryPoint (const float *in) | |
operator float * () | |
Direct conversion to float*. | |
operator const float * () const | |
Direct conversion to const float*. | |
const float | GetX () const |
Get X value. | |
const float | GetY () const |
Get Y value. | |
const float | GetZ () const |
Get Z value. | |
bool | SetX (const float ix) |
Set X value. | |
bool | SetY (const float iy) |
Set Y value. | |
bool | SetZ (const float iz) |
Set Z value. | |
void | Clear () |
Zero the vector. | |
float & | operator[] (const int rhs) |
const float | operator[] (const int rhs) const |
void | NormalizeSelf () |
Normalize (make |point| = 1). | |
const MercuryPoint | Normalize () const |
Return a normalized point. | |
float | Magnitude () const |
Return the magnitude of |this|. | |
float | GetBiggestElement () const |
void | ConvertToVector3 (float *out) const |
Write out to be = to this point. | |
void | ConvertToVector4 (float *out) const |
Write out to be = to this point, however the 4th element will be 0. | |
void | ConvertToIVector4 (float *out) const |
Write out to be = - to this point, however the 4th element will be 0. | |
MercuryPoint | operator * (const MercuryPoint &p) const |
Component-wise multiply. | |
MercuryPoint | operator/ (const MercuryPoint &p) const |
Component-wise divide. | |
MercuryPoint & | operator+= (const MercuryPoint &other) |
MercuryPoint & | operator-= (const MercuryPoint &other) |
MercuryPoint & | operator *= (float f) |
MercuryPoint & | operator/= (float f) |
MercuryPoint | operator+ (const MercuryPoint &other) const |
MercuryPoint | operator- (const MercuryPoint &other) const |
MercuryPoint | operator * (float f) const |
MercuryPoint | operator/ (float f) const |
bool | operator== (const MercuryPoint &p) const |
bool | operator!= (const MercuryPoint &p) const |
bool | operator== (const float f) const |
bool | operator!= (const float f) const |
MercuryPoint | CrossProduct (const MercuryPoint &p) const |
Obtain the cross product (*this) x p. | |
Public Attributes | |
float | x |
float | y |
float | z |
Friends | |
MercuryPoint | operator * (float f, const MercuryPoint &other) |
Definition at line 9 of file MercuryTypes.h.
MercuryPoint::MercuryPoint | ( | ) | [inline] |
Definition at line 12 of file MercuryTypes.h.
MercuryPoint::MercuryPoint | ( | float | ix, | |
float | iy, | |||
float | iz | |||
) | [inline] |
Definition at line 13 of file MercuryTypes.h.
MercuryPoint::MercuryPoint | ( | const float * | in | ) | [inline] |
Definition at line 14 of file MercuryTypes.h.
MercuryPoint::operator float * | ( | ) | [inline] |
MercuryPoint::operator const float * | ( | ) | const [inline] |
const float MercuryPoint::GetX | ( | ) | const [inline] |
const float MercuryPoint::GetY | ( | ) | const [inline] |
const float MercuryPoint::GetZ | ( | ) | const [inline] |
bool MercuryPoint::SetX | ( | const float | ix | ) | [inline] |
bool MercuryPoint::SetY | ( | const float | iy | ) | [inline] |
bool MercuryPoint::SetZ | ( | const float | iz | ) | [inline] |
void MercuryPoint::Clear | ( | ) | [inline] |
float & MercuryPoint::operator[] | ( | const int | rhs | ) |
Definition at line 18 of file MercuryTypes.cpp.
const float MercuryPoint::operator[] | ( | const int | rhs | ) | const |
Definition at line 7 of file MercuryTypes.cpp.
void MercuryPoint::NormalizeSelf | ( | ) |
const MercuryPoint MercuryPoint::Normalize | ( | ) | const |
float MercuryPoint::Magnitude | ( | ) | const |
float MercuryPoint::GetBiggestElement | ( | ) | const [inline] |
Definition at line 47 of file MercuryTypes.h.
void MercuryPoint::ConvertToVector3 | ( | float * | out | ) | const [inline] |
void MercuryPoint::ConvertToVector4 | ( | float * | out | ) | const [inline] |
Write out to be = to this point, however the 4th element will be 0.
Definition at line 52 of file MercuryTypes.h.
void MercuryPoint::ConvertToIVector4 | ( | float * | out | ) | const [inline] |
Write out to be = - to this point, however the 4th element will be 0.
Definition at line 54 of file MercuryTypes.h.
MercuryPoint MercuryPoint::operator * | ( | const MercuryPoint & | p | ) | const |
MercuryPoint MercuryPoint::operator/ | ( | const MercuryPoint & | p | ) | const |
MercuryPoint& MercuryPoint::operator+= | ( | const MercuryPoint & | other | ) | [inline] |
Definition at line 61 of file MercuryTypes.h.
MercuryPoint& MercuryPoint::operator-= | ( | const MercuryPoint & | other | ) | [inline] |
Definition at line 62 of file MercuryTypes.h.
MercuryPoint& MercuryPoint::operator *= | ( | float | f | ) | [inline] |
Definition at line 63 of file MercuryTypes.h.
MercuryPoint& MercuryPoint::operator/= | ( | float | f | ) | [inline] |
Definition at line 64 of file MercuryTypes.h.
MercuryPoint MercuryPoint::operator+ | ( | const MercuryPoint & | other | ) | const [inline] |
Definition at line 66 of file MercuryTypes.h.
MercuryPoint MercuryPoint::operator- | ( | const MercuryPoint & | other | ) | const [inline] |
Definition at line 67 of file MercuryTypes.h.
MercuryPoint MercuryPoint::operator * | ( | float | f | ) | const [inline] |
Definition at line 68 of file MercuryTypes.h.
MercuryPoint MercuryPoint::operator/ | ( | float | f | ) | const [inline] |
Definition at line 69 of file MercuryTypes.h.
bool MercuryPoint::operator== | ( | const MercuryPoint & | p | ) | const |
Definition at line 47 of file MercuryTypes.cpp.
bool MercuryPoint::operator!= | ( | const MercuryPoint & | p | ) | const [inline] |
Definition at line 74 of file MercuryTypes.h.
bool MercuryPoint::operator== | ( | const float | f | ) | const |
Definition at line 55 of file MercuryTypes.cpp.
bool MercuryPoint::operator!= | ( | const float | f | ) | const [inline] |
Definition at line 77 of file MercuryTypes.h.
MercuryPoint MercuryPoint::CrossProduct | ( | const MercuryPoint & | p | ) | const |
MercuryPoint operator * | ( | float | f, | |
const MercuryPoint & | other | |||
) | [friend] |
Definition at line 71 of file MercuryTypes.h.
float MercuryPoint::x |
Definition at line 82 of file MercuryTypes.h.
float MercuryPoint::y |
Definition at line 83 of file MercuryTypes.h.
float MercuryPoint::z |
Definition at line 84 of file MercuryTypes.h.