MercuryPoint Class Reference

A point in space/vector. More...

#include <MercuryTypes.h>

List of all members.

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.
MercuryPointoperator+= (const MercuryPoint &other)
MercuryPointoperator-= (const MercuryPoint &other)
MercuryPointoperator *= (float f)
MercuryPointoperator/= (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)


Detailed Description

A point in space/vector.

Definition at line 9 of file MercuryTypes.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

MercuryPoint::operator float * (  )  [inline]

Direct conversion to float*.

Definition at line 17 of file MercuryTypes.h.

MercuryPoint::operator const float * (  )  const [inline]

Direct conversion to const float*.

Definition at line 19 of file MercuryTypes.h.

const float MercuryPoint::GetX (  )  const [inline]

Get X value.

Definition at line 22 of file MercuryTypes.h.

const float MercuryPoint::GetY (  )  const [inline]

Get Y value.

Definition at line 24 of file MercuryTypes.h.

const float MercuryPoint::GetZ (  )  const [inline]

Get Z value.

Definition at line 26 of file MercuryTypes.h.

bool MercuryPoint::SetX ( const float  ix  )  [inline]

Set X value.

Definition at line 28 of file MercuryTypes.h.

bool MercuryPoint::SetY ( const float  iy  )  [inline]

Set Y value.

Definition at line 30 of file MercuryTypes.h.

bool MercuryPoint::SetZ ( const float  iz  )  [inline]

Set Z value.

Definition at line 32 of file MercuryTypes.h.

void MercuryPoint::Clear (  )  [inline]

Zero the vector.

Definition at line 34 of file MercuryTypes.h.

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 (  ) 

Normalize (make |point| = 1).

Definition at line 74 of file MercuryTypes.cpp.

const MercuryPoint MercuryPoint::Normalize (  )  const

Return a normalized point.

Definition at line 80 of file MercuryTypes.cpp.

float MercuryPoint::Magnitude (  )  const

Return the magnitude of |this|.

Definition at line 87 of file MercuryTypes.cpp.

float MercuryPoint::GetBiggestElement (  )  const [inline]

Definition at line 47 of file MercuryTypes.h.

void MercuryPoint::ConvertToVector3 ( float *  out  )  const [inline]

Write out to be = to this point.

Definition at line 50 of file MercuryTypes.h.

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

Component-wise multiply.

Definition at line 29 of file MercuryTypes.cpp.

MercuryPoint MercuryPoint::operator/ ( const MercuryPoint p  )  const

Component-wise divide.

Definition at line 38 of file MercuryTypes.cpp.

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

Obtain the cross product (*this) x p.

Definition at line 63 of file MercuryTypes.cpp.


Friends And Related Function Documentation

MercuryPoint operator * ( float  f,
const MercuryPoint other 
) [friend]

Definition at line 71 of file MercuryTypes.h.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo