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

#include <Vector.h>

Public Member Functions

 idVec2 (void)
 
 idVec2 (const float x, const float y)
 
void Set (const float x, const float y)
 
void Zero (void)
 
float operator[] (int index) const
 
floatoperator[] (int index)
 
idVec2 operator- () const
 
float operator* (const idVec2 &a) const
 
idVec2 operator* (const float a) const
 
idVec2 operator/ (const float a) const
 
idVec2 operator+ (const idVec2 &a) const
 
idVec2 operator- (const idVec2 &a) const
 
idVec2operator+= (const idVec2 &a)
 
idVec2operator-= (const idVec2 &a)
 
idVec2operator/= (const idVec2 &a)
 
idVec2operator/= (const float a)
 
idVec2operator*= (const float a)
 
bool Compare (const idVec2 &a) const
 
bool Compare (const idVec2 &a, const float epsilon) const
 
bool operator== (const idVec2 &a) const
 
bool operator!= (const idVec2 &a) const
 
float Length (void) const
 
float LengthFast (void) const
 
float LengthSqr (void) const
 
float Normalize (void)
 
float NormalizeFast (void)
 
idVec2Truncate (float length)
 
void Clamp (const idVec2 &min, const idVec2 &max)
 
void Snap (void)
 
void SnapInt (void)
 
int GetDimension (void) const
 
const floatToFloatPtr (void) const
 
floatToFloatPtr (void)
 
const char * ToString (int precision=2) const
 
void Lerp (const idVec2 &v1, const idVec2 &v2, const float l)
 

Public Attributes

float x
 
float y
 

Friends

idVec2 operator* (const float a, const idVec2 b)
 

Detailed Description

Definition at line 52 of file Vector.h.

Constructor & Destructor Documentation

ID_INLINE idVec2::idVec2 ( void  )

Definition at line 106 of file Vector.h.

ID_INLINE idVec2::idVec2 ( const float  x,
const float  y 
)
explicit

Definition at line 109 of file Vector.h.

Member Function Documentation

ID_INLINE void idVec2::Clamp ( const idVec2 min,
const idVec2 max 
)

Definition at line 209 of file Vector.h.

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

Definition at line 123 of file Vector.h.

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

Definition at line 127 of file Vector.h.

ID_INLINE int idVec2::GetDimension ( void  ) const

Definition at line 297 of file Vector.h.

ID_INLINE float idVec2::Length ( void  ) const

Definition at line 155 of file Vector.h.

ID_INLINE float idVec2::LengthFast ( void  ) const

Definition at line 159 of file Vector.h.

ID_INLINE float idVec2::LengthSqr ( void  ) const

Definition at line 166 of file Vector.h.

void idVec2::Lerp ( const idVec2 v1,
const idVec2 v2,
const float  l 
)

Definition at line 62 of file Vector.cpp.

ID_INLINE float idVec2::Normalize ( void  )

Definition at line 170 of file Vector.h.

ID_INLINE float idVec2::NormalizeFast ( void  )

Definition at line 180 of file Vector.h.

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

Definition at line 143 of file Vector.h.

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

Definition at line 240 of file Vector.h.

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

Definition at line 244 of file Vector.h.

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

Definition at line 290 of file Vector.h.

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

Definition at line 257 of file Vector.h.

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

Definition at line 261 of file Vector.h.

ID_INLINE idVec2 idVec2::operator- ( ) const

Definition at line 232 of file Vector.h.

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

Definition at line 236 of file Vector.h.

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

Definition at line 283 of file Vector.h.

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

Definition at line 248 of file Vector.h.

ID_INLINE idVec2 & idVec2::operator/= ( const idVec2 a)

Definition at line 268 of file Vector.h.

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

Definition at line 275 of file Vector.h.

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

Definition at line 139 of file Vector.h.

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

Definition at line 147 of file Vector.h.

ID_INLINE float & idVec2::operator[] ( int  index)

Definition at line 151 of file Vector.h.

ID_INLINE void idVec2::Set ( const float  x,
const float  y 
)

Definition at line 114 of file Vector.h.

ID_INLINE void idVec2::Snap ( void  )

Definition at line 222 of file Vector.h.

ID_INLINE void idVec2::SnapInt ( void  )

Definition at line 227 of file Vector.h.

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

Definition at line 301 of file Vector.h.

ID_INLINE float * idVec2::ToFloatPtr ( void  )

Definition at line 305 of file Vector.h.

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

Definition at line 51 of file Vector.cpp.

ID_INLINE idVec2 & idVec2::Truncate ( float  length)

Definition at line 190 of file Vector.h.

ID_INLINE void idVec2::Zero ( void  )

Definition at line 119 of file Vector.h.

Friends And Related Function Documentation

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

Definition at line 253 of file Vector.h.

Member Data Documentation

float idVec2::x

Definition at line 54 of file Vector.h.

float idVec2::y

Definition at line 55 of file Vector.h.


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