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
idVec3 Class Reference

#include <Vector.h>

Public Member Functions

 idVec3 (void)
 
 idVec3 (const float x, const float y, const float z)
 
void Set (const float x, const float y, const float z)
 
void Zero (void)
 
float operator[] (const int index) const
 
floatoperator[] (const int index)
 
idVec3 operator- () const
 
idVec3operator= (const idVec3 &a)
 
float operator* (const idVec3 &a) const
 
idVec3 operator* (const float a) const
 
idVec3 operator/ (const float a) const
 
idVec3 operator+ (const idVec3 &a) const
 
idVec3 operator- (const idVec3 &a) const
 
idVec3operator+= (const idVec3 &a)
 
idVec3operator-= (const idVec3 &a)
 
idVec3operator/= (const idVec3 &a)
 
idVec3operator/= (const float a)
 
idVec3operator*= (const float a)
 
bool Compare (const idVec3 &a) const
 
bool Compare (const idVec3 &a, const float epsilon) const
 
bool operator== (const idVec3 &a) const
 
bool operator!= (const idVec3 &a) const
 
bool FixDegenerateNormal (void)
 
bool FixDenormals (void)
 
idVec3 Cross (const idVec3 &a) const
 
idVec3Cross (const idVec3 &a, const idVec3 &b)
 
float Length (void) const
 
float LengthSqr (void) const
 
float LengthFast (void) const
 
float Normalize (void)
 
float NormalizeFast (void)
 
idVec3Truncate (float length)
 
void Clamp (const idVec3 &min, const idVec3 &max)
 
void Snap (void)
 
void SnapInt (void)
 
int GetDimension (void) const
 
float ToYaw (void) const
 
float ToPitch (void) const
 
idAngles ToAngles (void) const
 
idPolar3 ToPolar (void) const
 
idMat3 ToMat3 (void) const
 
const idVec2ToVec2 (void) const
 
idVec2ToVec2 (void)
 
const floatToFloatPtr (void) const
 
floatToFloatPtr (void)
 
const char * ToString (int precision=2) const
 
void NormalVectors (idVec3 &left, idVec3 &down) const
 
void OrthogonalBasis (idVec3 &left, idVec3 &up) const
 
void ProjectOntoPlane (const idVec3 &normal, const float overBounce=1.0f)
 
bool ProjectAlongPlane (const idVec3 &normal, const float epsilon, const float overBounce=1.0f)
 
void ProjectSelfOntoSphere (const float radius)
 
void Lerp (const idVec3 &v1, const idVec3 &v2, const float l)
 
void SLerp (const idVec3 &v1, const idVec3 &v2, const float l)
 

Public Attributes

float x
 
float y
 
float z
 

Friends

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

Detailed Description

Definition at line 316 of file Vector.h.

Constructor & Destructor Documentation

ID_INLINE idVec3::idVec3 ( void  )

Definition at line 392 of file Vector.h.

ID_INLINE idVec3::idVec3 ( const float  x,
const float  y,
const float  z 
)
explicit

Definition at line 395 of file Vector.h.

Member Function Documentation

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

Definition at line 677 of file Vector.h.

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

Definition at line 496 of file Vector.h.

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

Definition at line 500 of file Vector.h.

ID_INLINE idVec3 idVec3::Cross ( const idVec3 a) const

Definition at line 619 of file Vector.h.

ID_INLINE idVec3 & idVec3::Cross ( const idVec3 a,
const idVec3 b 
)

Definition at line 623 of file Vector.h.

ID_INLINE bool idVec3::FixDegenerateNormal ( void  )

Definition at line 535 of file Vector.h.

ID_INLINE bool idVec3::FixDenormals ( void  )

Definition at line 602 of file Vector.h.

ID_INLINE int idVec3::GetDimension ( void  ) const

Definition at line 707 of file Vector.h.

ID_INLINE float idVec3::Length ( void  ) const

Definition at line 631 of file Vector.h.

ID_INLINE float idVec3::LengthFast ( void  ) const

Definition at line 639 of file Vector.h.

ID_INLINE float idVec3::LengthSqr ( void  ) const

Definition at line 635 of file Vector.h.

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

Definition at line 232 of file Vector.cpp.

ID_INLINE float idVec3::Normalize ( void  )

Definition at line 646 of file Vector.h.

ID_INLINE float idVec3::NormalizeFast ( void  )

Definition at line 524 of file Vector.h.

ID_INLINE void idVec3::NormalVectors ( idVec3 left,
idVec3 down 
) const

Definition at line 727 of file Vector.h.

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

Definition at line 520 of file Vector.h.

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

Definition at line 434 of file Vector.h.

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

Definition at line 438 of file Vector.h.

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

Definition at line 488 of file Vector.h.

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

Definition at line 451 of file Vector.h.

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

Definition at line 455 of file Vector.h.

ID_INLINE idVec3 idVec3::operator- ( ) const

Definition at line 419 of file Vector.h.

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

Definition at line 430 of file Vector.h.

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

Definition at line 480 of file Vector.h.

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

Definition at line 442 of file Vector.h.

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

Definition at line 463 of file Vector.h.

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

Definition at line 471 of file Vector.h.

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

Definition at line 423 of file Vector.h.

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

Definition at line 516 of file Vector.h.

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

Definition at line 401 of file Vector.h.

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

Definition at line 405 of file Vector.h.

ID_INLINE void idVec3::OrthogonalBasis ( idVec3 left,
idVec3 up 
) const

Definition at line 744 of file Vector.h.

ID_INLINE bool idVec3::ProjectAlongPlane ( const idVec3 normal,
const float  epsilon,
const float  overBounce = 1.0f 
)

Definition at line 785 of file Vector.h.

ID_INLINE void idVec3::ProjectOntoPlane ( const idVec3 normal,
const float  overBounce = 1.0f 
)

Definition at line 769 of file Vector.h.

void idVec3::ProjectSelfOntoSphere ( const float  radius)

Definition at line 284 of file Vector.cpp.

ID_INLINE void idVec3::Set ( const float  x,
const float  y,
const float  z 
)

Definition at line 409 of file Vector.h.

void idVec3::SLerp ( const idVec3 v1,
const idVec3 v2,
const float  l 
)

Definition at line 252 of file Vector.cpp.

ID_INLINE void idVec3::Snap ( void  )

Definition at line 695 of file Vector.h.

ID_INLINE void idVec3::SnapInt ( void  )

Definition at line 701 of file Vector.h.

idAngles idVec3::ToAngles ( void  ) const

Definition at line 130 of file Vector.cpp.

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

Definition at line 719 of file Vector.h.

ID_INLINE float * idVec3::ToFloatPtr ( void  )

Definition at line 723 of file Vector.h.

idMat3 idVec3::ToMat3 ( void  ) const

Definition at line 195 of file Vector.cpp.

float idVec3::ToPitch ( void  ) const

Definition at line 104 of file Vector.cpp.

idPolar3 idVec3::ToPolar ( void  ) const

Definition at line 163 of file Vector.cpp.

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

Definition at line 221 of file Vector.cpp.

ID_INLINE const idVec2 & idVec3::ToVec2 ( void  ) const

Definition at line 711 of file Vector.h.

ID_INLINE idVec2 & idVec3::ToVec2 ( void  )

Definition at line 715 of file Vector.h.

float idVec3::ToYaw ( void  ) const

Definition at line 84 of file Vector.cpp.

ID_INLINE idVec3 & idVec3::Truncate ( float  length)

Definition at line 657 of file Vector.h.

ID_INLINE void idVec3::Zero ( void  )

Definition at line 415 of file Vector.h.

Friends And Related Function Documentation

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

Definition at line 447 of file Vector.h.

Member Data Documentation

float idVec3::x

Definition at line 318 of file Vector.h.

float idVec3::y

Definition at line 319 of file Vector.h.

float idVec3::z

Definition at line 320 of file Vector.h.


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