Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::math::Quat Class Reference

#include <Quat.h>

Public Member Functions

 Quat ()
 Sazande kahli ke W = 1 va baghie = 0 meghdar dehi mishan.
 Quat (float fX, float fY, float fZ, float fW)
 Sazande ke 4 ta parametr ra migire.
float Magnitude () const
 Ye chizi to maye haye Lenght vector hast.
void Normalize ()
 Normalize the quaternion.
Quat operator+ (const Quat &rQuat) const
 Jame do ta Quat ba ham.
Quat operator- (const Quat &rQuat) const
 Menha kardane do ta quat az ham.
Quat operator* (const float fScalar) const
 Zarbe ye Quat ba ye float.
Quat operator/ (const float fScalar) const
 Taghsime ye Quat ba ye float.
Quat operator- (void) const
 Manfi kardane Quat.
void FromEulers (const float *fpAngles)
void FromEulers (float fX, float fY, float fZ)
Matrix ToMatrix ()
 Tabdile quat be matrixe 4x4.

Static Public Member Functions

static Quat LERP (const Quat &rQuat0, const Quat &rQuat1, float fInterp)
static Quat SLERP (const Quat &rQuat0, const Quat &rQuat1, float fInterp)

Public Attributes

union {
   float   m_fQuat [4]
 X Y Z W.
   struct {
      float   X
      float   Y
      float   Z
      float   W
   } 
}; 

Detailed Description

Definition at line 16 of file Quat.h.

Constructor & Destructor Documentation

kge::math::Quat::Quat ( )

Sazande kahli ke W = 1 va baghie = 0 meghdar dehi mishan.

kge::math::Quat::Quat ( float  fX,
float  fY,
float  fZ,
float  fW 
)

Sazande ke 4 ta parametr ra migire.

Member Function Documentation

void kge::math::Quat::FromEulers ( const float *  fpAngles)

Az zavie charkheshe dore 3 mehvare X, Y va Z quat ro misaze.

Parameters
fpAnglesye arraye 3 khone e ke betartib zavie charkhes dor mehvare X, Y, Z hastand.
void kge::math::Quat::FromEulers ( float  fX,
float  fY,
float  fZ 
)
inline

Az zavie charkheshe dore 3 mehvare X, Y va Z quat ro misaze.

Parameters
fXzavie chrkhesh dore mevare X ha.
fYzavie chrkhesh dore mevare Y ha.
fZzavie chrkhesh dore mevare Z ha.

Definition at line 83 of file Quat.h.

static Quat kge::math::Quat::LERP ( const Quat rQuat0,
const Quat rQuat1,
float  fInterp 
)
static

Bedast avardane quati beyne do ta quat.

Parameters
rQuat0Avalin quat.
rQuat1Dovomin quat.
fInterpin meghdari hast ke moshakhas mikonad ke quat hasel be kodom quat nazdik tar bashad va meghdare hasele bayad beyne 0.0f va 1.0f bashad.
Returns
Quati beyne do ta quat barmigardone.
float kge::math::Quat::Magnitude ( ) const
inline

Ye chizi to maye haye Lenght vector hast.

Definition at line 40 of file Quat.h.

void kge::math::Quat::Normalize ( )
inline

Normalize the quaternion.

Definition at line 46 of file Quat.h.

Quat kge::math::Quat::operator* ( const float  fScalar) const

Zarbe ye Quat ba ye float.

Quat kge::math::Quat::operator+ ( const Quat rQuat) const

Jame do ta Quat ba ham.

Quat kge::math::Quat::operator- ( const Quat rQuat) const

Menha kardane do ta quat az ham.

Quat kge::math::Quat::operator- ( void  ) const

Manfi kardane Quat.

Quat kge::math::Quat::operator/ ( const float  fScalar) const

Taghsime ye Quat ba ye float.

static Quat kge::math::Quat::SLERP ( const Quat rQuat0,
const Quat rQuat1,
float  fInterp 
)
static

Bedast avardane quati beyne do ta quat ke roye ye kaman bashand. In bishtar baraye rotate ha estefade mishe.

Parameters
rQuat0Avalin quat.
rQuat1Dovomin quat.
fInterpin meghdari hast ke moshakhas mikonad ke quat hasel be kodom quat nazdik tar bashad va meghdare hasele bayad beyne 0.0f va 1.0f bashad.
Returns
Quati beyne do ta quat barmigardone.
Matrix kge::math::Quat::ToMatrix ( )
inline

Tabdile quat be matrixe 4x4.

Definition at line 99 of file Quat.h.

References kge::math::Matrix::m_fMat.

Member Data Documentation

union { ... }
float kge::math::Quat::m_fQuat[4]

X Y Z W.

Definition at line 23 of file Quat.h.

float kge::math::Quat::W

Definition at line 29 of file Quat.h.

float kge::math::Quat::X

Definition at line 26 of file Quat.h.

float kge::math::Quat::Y

Definition at line 27 of file Quat.h.

float kge::math::Quat::Z

Definition at line 28 of file Quat.h.


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