TVector4 Class Reference
[Math classes]

List of all members.

Public Member Functions

 TVector4 (void)
 TVector4 (const real xx, const real yy, const real zz, const real ww)
void SetValues (const real xx, const real yy, const real zz, const real ww)
uint32 GetDimension (void) const
void SetFromXYZ (const TVector3 &v, const real w)
TVector3 & CastToXYZ (void)
const TVector3 & CastToXYZ (void) const
const real & operator() (const uint32 elemNum) const
real & operator() (const uint32 elemNum)
const real & operator[] (const uint32 elemNum) const
real & operator[] (const uint32 elemNum)
real & X (void)
real & Y (void)
real & Z (void)
real & W (void)
real X (void) const
real Y (void) const
real Z (void) const
real W (void) const
real GetMagnitude (void) const
real GetMagnitudeSquared (void) const
real GetDistance (const TVector4 &rhs) const
boolean SetMagnitude (const real newMagnitude)
void SetToCenter (const TVector4 &v0, const TVector4 &v1)
boolean Normalize (const real zeroTolerance=0.0f)
boolean NormalizeOrReplaceWith (const TVector4 &replacement, const real zeroTolerance=0.0f)
boolean IsEqual (const TVector4 &compareVec, const real zeroTolerance=0.0f) const
void ClampValue (const TVector4 &min, const TVector4 &max)
void Negate (void)
void Interpolate (const TVector4 &vstart, const TVector4 &vend, const float t)
void Swap (TVector4 &v)
TVector4 & operator/= (const real scalar)
TVector4 & operator *= (const real scalar)
TVector4 & operator+= (const TVector4 &v)
TVector4 & operator-= (const TVector4 &v)
real Normalize (TVector4 &result) const

Public Attributes

real x
real y
real z
real w

Static Public Attributes

const TVector4 kZero
 ( 0.0, 0.0, 0.0, 0.0 );
const TVector4 kOnes
 ( 1.0, 1.0, 1.0, 1.0 );
const TVector4 kUnitX
 ( 1.0, 0.0, 0.0, 0.0 );
const TVector4 kUnitY
 ( 0.0, 1.0, 0.0, 0.0 );
const TVector4 kUnitZ
 ( 0.0, 0.0, 1.0, 0.0 );
const TVector4 kUnitW
 ( 0.0, 0.0, 0.0, 1.0 );
const TVector4 kNegativeX
 ( -1.0, 0.0, 0.0, 0.0 );
const TVector4 kNegativeY
 ( 0.0, -1.0, 0.0, 0.0 );
const TVector4 kNegativeZ
 ( 0.0, 0.0, -1.0, 0.0 );
const TVector4 kNegativeW
 ( 0.0, 0.0, 0.0, -1.0 );

Detailed Description

Defines a 4 dimensional floating point vector.


Constructor & Destructor Documentation

TVector4::TVector4 (  void   )  [inline]
 

TVector4::TVector4 (  const real  xx,
const real  yy,
const real  zz,
const real  ww
)  [inline]
 


Member Function Documentation

const TVector3 & TVector4::CastToXYZ (  void   )  const [inline]
 

TVector3 & TVector4::CastToXYZ (  void   )  [inline]
 

void TVector4::ClampValue (  const TVector4 &  min,
const TVector4 &  max
) 
 

uint32 TVector4::GetDimension (  void   )  const [inline]
 

real TVector4::GetDistance (  const TVector4 &  rhs  )  const [inline]
 

real TVector4::GetMagnitude (  void   )  const [inline]
 

real TVector4::GetMagnitudeSquared (  void   )  const [inline]
 

void TVector4::Interpolate (  const TVector4 &  vstart,
const TVector4 &  vend,
const float  t
) 
 

boolean TVector4::IsEqual (  const TVector4 &  compareVec,
const real  zeroTolerance = 0.0f
)  const
 

void TVector4::Negate (  void   )  [inline]
 

real TVector4::Normalize (  TVector4 &  result  )  const
 

This sets the passed in vector to the normalized version of this, and returns the magnitude for the vector.

boolean TVector4::Normalize (  const real  zeroTolerance = 0.0f  )  [inline]
 

boolean TVector4::NormalizeOrReplaceWith (  const TVector4 &  replacement,
const real  zeroTolerance = 0.0f
)  [inline]
 

TVector4 & TVector4::operator *= (  const real  scalar  )  [inline]
 

real & TVector4::operator() (  const uint32  elemNum  )  [inline]
 

const real & TVector4::operator() (  const uint32  elemNum  )  const [inline]
 

TVector4 & TVector4::operator+= (  const TVector4 &  v  )  [inline]
 

TVector4 & TVector4::operator-= (  const TVector4 &  v  )  [inline]
 

TVector4 & TVector4::operator/= (  const real  scalar  )  [inline]
 

real & TVector4::operator[] (  const uint32  elemNum  )  [inline]
 

const real & TVector4::operator[] (  const uint32  elemNum  )  const [inline]
 

void TVector4::SetFromXYZ (  const TVector3 &  v,
const real  w
) 
 

boolean TVector4::SetMagnitude (  const real  newMagnitude  ) 
 

void TVector4::SetToCenter (  const TVector4 &  v0,
const TVector4 &  v1
) 
 

void TVector4::SetValues (  const real  xx,
const real  yy,
const real  zz,
const real  ww
)  [inline]
 

void TVector4::Swap (  TVector4 &  v  ) 
 

real TVector4::W (  void   )  const [inline]
 

real & TVector4::W (  void   )  [inline]
 

real TVector4::X (  void   )  const [inline]
 

real & TVector4::X (  void   )  [inline]
 

real TVector4::Y (  void   )  const [inline]
 

real & TVector4::Y (  void   )  [inline]
 

real TVector4::Z (  void   )  const [inline]
 

real & TVector4::Z (  void   )  [inline]
 


Member Data Documentation

const TVector4 TVector4::kNegativeW [static]
 

( 0.0, 0.0, 0.0, -1.0 );

const TVector4 TVector4::kNegativeX [static]
 

( -1.0, 0.0, 0.0, 0.0 );

const TVector4 TVector4::kNegativeY [static]
 

( 0.0, -1.0, 0.0, 0.0 );

const TVector4 TVector4::kNegativeZ [static]
 

( 0.0, 0.0, -1.0, 0.0 );

const TVector4 TVector4::kOnes [static]
 

( 1.0, 1.0, 1.0, 1.0 );

const TVector4 TVector4::kUnitW [static]
 

( 0.0, 0.0, 0.0, 1.0 );

const TVector4 TVector4::kUnitX [static]
 

( 1.0, 0.0, 0.0, 0.0 );

const TVector4 TVector4::kUnitY [static]
 

( 0.0, 1.0, 0.0, 0.0 );

const TVector4 TVector4::kUnitZ [static]
 

( 0.0, 0.0, 1.0, 0.0 );

const TVector4 TVector4::kZero [static]
 

( 0.0, 0.0, 0.0, 0.0 );

real TVector4::w
 

real TVector4::x
 

real TVector4::y
 

real TVector4::z
 


The documentation for this class was generated from the following file:
Generated on Mon Mar 14 12:29:10 2005 for Carrara SDK Doc by  doxygen 1.3.9.1