Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CFixedVector3D Class Reference

#include <FixedVector3D.h>

Collaboration diagram for CFixedVector3D:

Public Member Functions

 CFixedVector3D ()
 
 CFixedVector3D (fixed X, fixed Y, fixed Z)
 
bool operator== (const CFixedVector3D &v) const
 Vector equality. More...
 
bool operator!= (const CFixedVector3D &v) const
 Vector inequality. More...
 
CFixedVector3D operator+ (const CFixedVector3D &v) const
 Vector addition. More...
 
CFixedVector3D operator- (const CFixedVector3D &v) const
 Vector subtraction. More...
 
CFixedVector3D operator- () const
 Negation. More...
 
CFixedVector3Doperator+= (const CFixedVector3D &v)
 Vector addition. More...
 
CFixedVector3Doperator-= (const CFixedVector3D &v)
 Vector subtraction. More...
 
fixed Length () const
 Returns the length of the vector. More...
 
void Normalize ()
 Normalize the vector so that length is close to 1. More...
 
void Normalize (fixed n)
 Normalize the vector so that length is close to n. More...
 
CFixedVector3D Cross (const CFixedVector3D &v)
 Compute the cross product of this vector with another. More...
 
fixed Dot (const CFixedVector3D &v)
 Compute the dot product of this vector with another. More...
 

Public Attributes

fixed X
 
fixed Y
 
fixed Z
 

Constructor & Destructor Documentation

◆ CFixedVector3D() [1/2]

CFixedVector3D::CFixedVector3D ( )
inline

◆ CFixedVector3D() [2/2]

CFixedVector3D::CFixedVector3D ( fixed  X,
fixed  Y,
fixed  Z 
)
inline

Member Function Documentation

◆ Cross()

CFixedVector3D CFixedVector3D::Cross ( const CFixedVector3D v)
inline

Compute the cross product of this vector with another.

◆ Dot()

fixed CFixedVector3D::Dot ( const CFixedVector3D v)
inline

Compute the dot product of this vector with another.

◆ Length()

fixed CFixedVector3D::Length ( ) const
inline

Returns the length of the vector.

Will not overflow if the result can be represented as type 'fixed'.

◆ Normalize() [1/2]

void CFixedVector3D::Normalize ( )
inline

Normalize the vector so that length is close to 1.

If length is 0, does nothing.

◆ Normalize() [2/2]

void CFixedVector3D::Normalize ( fixed  n)
inline

Normalize the vector so that length is close to n.

If length is 0, does nothing.

◆ operator!=()

bool CFixedVector3D::operator!= ( const CFixedVector3D v) const
inline

Vector inequality.

◆ operator+()

CFixedVector3D CFixedVector3D::operator+ ( const CFixedVector3D v) const
inline

Vector addition.

◆ operator+=()

CFixedVector3D & CFixedVector3D::operator+= ( const CFixedVector3D v)
inline

Vector addition.

◆ operator-() [1/2]

CFixedVector3D CFixedVector3D::operator- ( ) const
inline

Negation.

◆ operator-() [2/2]

CFixedVector3D CFixedVector3D::operator- ( const CFixedVector3D v) const
inline

Vector subtraction.

◆ operator-=()

CFixedVector3D & CFixedVector3D::operator-= ( const CFixedVector3D v)
inline

Vector subtraction.

◆ operator==()

bool CFixedVector3D::operator== ( const CFixedVector3D v) const
inline

Vector equality.

Member Data Documentation

◆ X

fixed CFixedVector3D::X

◆ Y

fixed CFixedVector3D::Y

◆ Z

fixed CFixedVector3D::Z

The documentation for this class was generated from the following file: