pgQuat Struct Reference
[pgMath -- Mathematics module]

A quaternion. More...

#include <pg_quat.h>

List of all members.

Public Member Functions

 pgQuat ()
 Constructs a pgQuat.
 pgQuat (r32 x_, r32 y_, r32 z_, r32 w_)
 Constructs and initialize a pgQaut from the specified xyzw coordinates.
void set (r32 x_, r32 y_, r32 z_, r32 w_)
 Sets all components from the specified xyzw coordinates.
pgQuat slerp (const pgQuat &to, r32 ratio) const
 Returns a pgQuat which is interpolated between this pgQuat and an another pgQuat by the specified ratio, using spherical linear interpolation.
pgMat toMat (const pgVec &trans) const
 Returns a pgMat which is converted from the axes of this pgQuat and the translation of the specified pgVec.

Static Public Member Functions

static pgQuat fromMat (const pgMat &mat)
 Returns a pgQuat which is converted from the specified pgMat.

Public Attributes

r32 x
 The x-coordinate.
r32 y
 The y-coordinate.
r32 z
 The z-coordinate.
r32 w
 The w-coordinate.


Detailed Description

A quaternion.

Constructor & Destructor Documentation

pgQuat::pgQuat ( r32  x_,
r32  y_,
r32  z_,
r32  w_ 
)

Constructs and initialize a pgQaut from the specified xyzw coordinates.

Parameters:
[in] x_ The x-coordinate.
[in] y_ The y-coordinate.
[in] z_ The z-coordinate.
[in] w_ The w-coordinate.


Member Function Documentation

static pgQuat pgQuat::fromMat ( const pgMat mat  )  [static]

Returns a pgQuat which is converted from the specified pgMat.

Parameters:
[in] mat A pgMat, whose translation is ignored.
Returns:
A pgQuat which is converted from the specified pgMat.

void pgQuat::set ( r32  x_,
r32  y_,
r32  z_,
r32  w_ 
)

Sets all components from the specified xyzw coordinates.

Parameters:
[in] x_ The x-coordinate.
[in] y_ The y-coordinate.
[in] z_ The z-coordinate.
[in] w_ The w-coordinate.

pgQuat pgQuat::slerp ( const pgQuat to,
r32  ratio 
) const

Returns a pgQuat which is interpolated between this pgQuat and an another pgQuat by the specified ratio, using spherical linear interpolation.

Parameters:
[in] to An another pgQuat.
[in] ratio The value which indicates how far to interpolate between two pgQuats. This value is clamped between 0.0f and 1.0f.
Returns:
A pgQuat which is interpolated between two pgQuats.

pgMat pgQuat::toMat ( const pgVec trans  )  const

Returns a pgMat which is converted from the axes of this pgQuat and the translation of the specified pgVec.

Parameters:
[in] trans The translation.
Returns:
A pgMat which is converted from the axes of this pgQuat and the translation of the specified pgVec.


Member Data Documentation

r32 pgQuat::w

The w-coordinate.

r32 pgQuat::x

The x-coordinate.

r32 pgQuat::y

The y-coordinate.

r32 pgQuat::z

The z-coordinate.


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

Generated on Sat Aug 15 11:24:38 2009 for Pogolyn by  doxygen 1.5.8