Quaternion Class Reference

List of all members.

Static Public Member Functions

static mixed fromAngleAxis (mixed ang, mixed x, mixed y, mixed z)
 x,y,z must be normalized, see Vector.normalise
static mixed inverse (mixed w, mixed x, mixed y, mixed z)
static mixed norm (mixed w, mixed x, mixed y, mixed z)
static mixed normalise (mixed w, mixed x, mixed y, mixed z)
static mixed random (mixed ang)
static mixed getRotation (mixed x1, mixed y1, mixed z1, mixed x2, mixed y2, mixed z2)
static mixed ApplyToVector (mixed x, mixed y, mixed z, mixed qw, mixed qx, mixed qy, mixed qz)
 returns x,y,z
static mixed Mul (mixed aw, mixed ax, mixed ay, mixed az, mixed bw, mixed bx, mixed by, mixed bz)
static mixed reduce (mixed qw, mixed qx, mixed qy, mixed qz, mixed t)
static mixed setAngle (mixed qw, mixed qx, mixed qy, mixed qz, mixed newang)
static mixed getAngle (mixed qw, mixed qx, mixed qy, mixed qz)
 returns rotation angle in radians
static mixed lookAt (mixed x, mixed y, mixed z)
 returns qw,qx,qy,qz


Detailed Description

Definition at line 795 of file lua_pseudo_code.cpp.


Member Function Documentation

static mixed Quaternion::fromAngleAxis ( mixed  ang,
mixed  x,
mixed  y,
mixed  z 
) [inline, static]

x,y,z must be normalized, see Vector.normalise

Definition at line 798 of file lua_pseudo_code.cpp.

static mixed Quaternion::inverse ( mixed  w,
mixed  x,
mixed  y,
mixed  z 
) [inline, static]

Definition at line 800 of file lua_pseudo_code.cpp.

static mixed Quaternion::norm ( mixed  w,
mixed  x,
mixed  y,
mixed  z 
) [inline, static]

Definition at line 802 of file lua_pseudo_code.cpp.

static mixed Quaternion::normalise ( mixed  w,
mixed  x,
mixed  y,
mixed  z 
) [inline, static]

Definition at line 804 of file lua_pseudo_code.cpp.

static mixed Quaternion::random ( mixed  ang  )  [inline, static]

returns a rotation with length=ang around a random axis, ang defaults to random returns qw,qx,qy,qz

Definition at line 808 of file lua_pseudo_code.cpp.

static mixed Quaternion::getRotation ( mixed  x1,
mixed  y1,
mixed  z1,
mixed  x2,
mixed  y2,
mixed  z2 
) [inline, static]

returns the shortest arc quaternion to rotate vector1 to vector2 returns qw,qx,qy,qz

Definition at line 812 of file lua_pseudo_code.cpp.

static mixed Quaternion::ApplyToVector ( mixed  x,
mixed  y,
mixed  z,
mixed  qw,
mixed  qx,
mixed  qy,
mixed  qz 
) [inline, static]

returns x,y,z

Definition at line 815 of file lua_pseudo_code.cpp.

static mixed Quaternion::Mul ( mixed  aw,
mixed  ax,
mixed  ay,
mixed  az,
mixed  bw,
mixed  bx,
mixed  by,
mixed  bz 
) [inline, static]

Mul(a,b) = a*b, multiplies two quaternions, generally not commutative (a*b != b*a) returns qw,qx,qy,qz

Definition at line 819 of file lua_pseudo_code.cpp.

static mixed Quaternion::reduce ( mixed  qw,
mixed  qx,
mixed  qy,
mixed  qz,
mixed  t 
) [inline, static]

reduces a turn-quaternions angle, t=1 = no change returns qw,qx,qy,qz

Definition at line 823 of file lua_pseudo_code.cpp.

static mixed Quaternion::setAngle ( mixed  qw,
mixed  qx,
mixed  qy,
mixed  qz,
mixed  newang 
) [inline, static]

changes the rotation angle while leaving the axis returns qw,qx,qy,qz

Definition at line 827 of file lua_pseudo_code.cpp.

static mixed Quaternion::getAngle ( mixed  qw,
mixed  qx,
mixed  qy,
mixed  qz 
) [inline, static]

returns rotation angle in radians

Definition at line 830 of file lua_pseudo_code.cpp.

static mixed Quaternion::lookAt ( mixed  x,
mixed  y,
mixed  z 
) [inline, static]

returns qw,qx,qy,qz

Definition at line 833 of file lua_pseudo_code.cpp.


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

Generated on Tue Feb 7 06:00:27 2012 for lua by  doxygen 1.5.6