doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
idVecX Class Reference

#include <Vector.h>

Public Member Functions

 idVecX (void)
 
 idVecX (int length)
 
 idVecX (int length, float *data)
 
 ~idVecX (void)
 
float operator[] (const int index) const
 
floatoperator[] (const int index)
 
idVecX operator- () const
 
idVecXoperator= (const idVecX &a)
 
idVecX operator* (const float a) const
 
idVecX operator/ (const float a) const
 
float operator* (const idVecX &a) const
 
idVecX operator- (const idVecX &a) const
 
idVecX operator+ (const idVecX &a) const
 
idVecXoperator*= (const float a)
 
idVecXoperator/= (const float a)
 
idVecXoperator+= (const idVecX &a)
 
idVecXoperator-= (const idVecX &a)
 
bool Compare (const idVecX &a) const
 
bool Compare (const idVecX &a, const float epsilon) const
 
bool operator== (const idVecX &a) const
 
bool operator!= (const idVecX &a) const
 
void SetSize (int size)
 
void ChangeSize (int size, bool makeZero=false)
 
int GetSize (void) const
 
void SetData (int length, float *data)
 
void Zero (void)
 
void Zero (int length)
 
void Random (int seed, float l=0.0f, float u=1.0f)
 
void Random (int length, int seed, float l=0.0f, float u=1.0f)
 
void Negate (void)
 
void Clamp (float min, float max)
 
idVecXSwapElements (int e1, int e2)
 
float Length (void) const
 
float LengthSqr (void) const
 
idVecX Normalize (void) const
 
float NormalizeSelf (void)
 
int GetDimension (void) const
 
const idVec3SubVec3 (int index) const
 
idVec3SubVec3 (int index)
 
const idVec6SubVec6 (int index) const
 
idVec6SubVec6 (int index)
 
const floatToFloatPtr (void) const
 
floatToFloatPtr (void)
 
const char * ToString (int precision=2) const
 

Private Member Functions

void SetTempSize (int size)
 

Private Attributes

int size
 
int alloced
 
floatp
 

Static Private Attributes

static float temp [VECX_MAX_TEMP+4]
 
static floattempPtr = (float *) ( ( (int) idVecX::temp + 15 ) & ~15 )
 
static int tempIndex = 0
 

Friends

class idMatX
 
idVecX operator* (const float a, const idVecX b)
 

Detailed Description

Definition at line 1435 of file Vector.h.

Constructor & Destructor Documentation

ID_INLINE idVecX::idVecX ( void  )

Definition at line 1506 of file Vector.h.

ID_INLINE idVecX::idVecX ( int  length)
explicit

Definition at line 1511 of file Vector.h.

ID_INLINE idVecX::idVecX ( int  length,
float data 
)
explicit

Definition at line 1517 of file Vector.h.

ID_INLINE idVecX::~idVecX ( void  )

Definition at line 1523 of file Vector.h.

Member Function Documentation

ID_INLINE void idVecX::ChangeSize ( int  size,
bool  makeZero = false 
)

Definition at line 1720 of file Vector.h.

ID_INLINE void idVecX::Clamp ( float  min,
float  max 
)

Definition at line 1818 of file Vector.h.

ID_INLINE bool idVecX::Compare ( const idVecX a) const

Definition at line 1675 of file Vector.h.

ID_INLINE bool idVecX::Compare ( const idVecX a,
const float  epsilon 
) const

Definition at line 1687 of file Vector.h.

ID_INLINE int idVecX::GetDimension ( void  ) const

Definition at line 1886 of file Vector.h.

int idVecX::GetSize ( void  ) const
inline

Definition at line 1467 of file Vector.h.

ID_INLINE float idVecX::Length ( void  ) const

Definition at line 1837 of file Vector.h.

ID_INLINE float idVecX::LengthSqr ( void  ) const

Definition at line 1847 of file Vector.h.

ID_INLINE void idVecX::Negate ( void  )

Definition at line 1807 of file Vector.h.

ID_INLINE idVecX idVecX::Normalize ( void  ) const

Definition at line 1857 of file Vector.h.

ID_INLINE float idVecX::NormalizeSelf ( void  )

Definition at line 1873 of file Vector.h.

ID_INLINE bool idVecX::operator!= ( const idVecX a) const

Definition at line 1703 of file Vector.h.

ID_INLINE idVecX idVecX::operator* ( const float  a) const

Definition at line 1622 of file Vector.h.

ID_INLINE float idVecX::operator* ( const idVecX a) const

Definition at line 1664 of file Vector.h.

ID_INLINE idVecX & idVecX::operator*= ( const float  a)

Definition at line 1637 of file Vector.h.

ID_INLINE idVecX idVecX::operator+ ( const idVecX a) const

Definition at line 1562 of file Vector.h.

ID_INLINE idVecX & idVecX::operator+= ( const idVecX a)

Definition at line 1594 of file Vector.h.

ID_INLINE idVecX idVecX::operator- ( ) const

Definition at line 1540 of file Vector.h.

ID_INLINE idVecX idVecX::operator- ( const idVecX a) const

Definition at line 1578 of file Vector.h.

ID_INLINE idVecX & idVecX::operator-= ( const idVecX a)

Definition at line 1608 of file Vector.h.

ID_INLINE idVecX idVecX::operator/ ( const float  a) const

Definition at line 1649 of file Vector.h.

ID_INLINE idVecX & idVecX::operator/= ( const float  a)

Definition at line 1654 of file Vector.h.

ID_INLINE idVecX & idVecX::operator= ( const idVecX a)

Definition at line 1551 of file Vector.h.

ID_INLINE bool idVecX::operator== ( const idVecX a) const

Definition at line 1699 of file Vector.h.

ID_INLINE float idVecX::operator[] ( const int  index) const

Definition at line 1530 of file Vector.h.

ID_INLINE float & idVecX::operator[] ( const int  index)

Definition at line 1535 of file Vector.h.

ID_INLINE void idVecX::Random ( int  seed,
float  l = 0.0f,
float  u = 1.0f 
)

Definition at line 1784 of file Vector.h.

ID_INLINE void idVecX::Random ( int  length,
int  seed,
float  l = 0.0f,
float  u = 1.0f 
)

Definition at line 1795 of file Vector.h.

ID_INLINE void idVecX::SetData ( int  length,
float data 
)

Definition at line 1756 of file Vector.h.

ID_INLINE void idVecX::SetSize ( int  size)

Definition at line 1707 of file Vector.h.

ID_INLINE void idVecX::SetTempSize ( int  size)
private

Definition at line 1743 of file Vector.h.

ID_INLINE const idVec3 & idVecX::SubVec3 ( int  index) const

Definition at line 1895 of file Vector.h.

ID_INLINE idVec3 & idVecX::SubVec3 ( int  index)

Definition at line 1890 of file Vector.h.

ID_INLINE const idVec6 & idVecX::SubVec6 ( int  index) const

Definition at line 1905 of file Vector.h.

ID_INLINE idVec6 & idVecX::SubVec6 ( int  index)

Definition at line 1900 of file Vector.h.

ID_INLINE idVecX & idVecX::SwapElements ( int  e1,
int  e2 
)

Definition at line 1829 of file Vector.h.

ID_INLINE const float * idVecX::ToFloatPtr ( void  ) const

Definition at line 1910 of file Vector.h.

ID_INLINE float * idVecX::ToFloatPtr ( void  )

Definition at line 1914 of file Vector.h.

const char * idVecX::ToString ( int  precision = 2) const

Definition at line 395 of file Vector.cpp.

ID_INLINE void idVecX::Zero ( void  )

Definition at line 1767 of file Vector.h.

ID_INLINE void idVecX::Zero ( int  length)

Definition at line 1775 of file Vector.h.

Friends And Related Function Documentation

friend class idMatX
friend

Definition at line 1436 of file Vector.h.

idVecX operator* ( const float  a,
const idVecX  b 
)
friend

Definition at line 1660 of file Vector.h.

Member Data Documentation

int idVecX::alloced
private

Definition at line 1494 of file Vector.h.

float* idVecX::p
private

Definition at line 1495 of file Vector.h.

int idVecX::size
private

Definition at line 1493 of file Vector.h.

float idVecX::temp
staticprivate

Definition at line 1497 of file Vector.h.

int idVecX::tempIndex = 0
staticprivate

Definition at line 1499 of file Vector.h.

float * idVecX::tempPtr = (float *) ( ( (int) idVecX::temp + 15 ) & ~15 )
staticprivate

Definition at line 1498 of file Vector.h.


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