Quat_i.kl

Types

Quat_i (struct)

The Quat_i represents a 3D rotation as a quaternion. Quaternions are used within the Xfo type. A Quat_i can be converted to and from Mat33_i as well as Euler_i types.

参考

Xfo, Euler_i, Mat33_i

/*
** Example: Quat_i
*/

// create several quaternions
Quat_i q0, q1, q2, q3, q4;
q0 = Quat_i(Vec3_i(1.0, 0.0, 0.0), 0.0);
q1.setFromEuler_i(Euler_i(PI, 0.0, 0.0));
q2.setFromDirectionAndUpvector(Vec3_i(1.0, 0.0, 0.0), Vec3_i(0.0, 1.0, 0.0));
q3.setFrom2Vectors(Vec3_i(1.0, 0.0, 0.0), Vec3_i(1.0, 1.0, 0.0));
q4.setFromAxisAndAngle(Vec3_i(0.0, 1.0, 0.0), HALF_PI);

Members

Vec3_i v  
SInt32 w  

Methods

  Quat_i ( in Euler_i e )
  Quat_i ( in Mat33_i mat )
  Quat_i ( in Quat_i other )
  Quat_i ( in SInt32 w, in Vec3_i v )
  Quat_i ( in SInt32 x, in SInt32 y, in SInt32 z, in SInt32 w )
  Quat_i ( in Vec3_i v, in SInt32 w )
  Quat_i ()
Quat_i add ? ( in Quat_i other )
  alignWith ! ( in Quat_i other )
Boolean almostEqual ? ( in Quat_i other )
Boolean almostEqual ? ( in Quat_i other, in SInt32 precision )
Quat_i clone ? ()
Quat_i conjugate ? ()
Quat_i divide ? ( in Quat_i other )
Quat_i divideSInt32 ? ( in SInt32 other )
SInt32 dot ? ( in Quat_i other )
Boolean equal ? ( in Quat_i other )
  get ? ( io Float32 v<> )
  get ? ( io Float32 v<>, in UInt32 o )
  get ? ( io Float32 v[] )
  get ? ( io Float32 v[], in UInt32 o )
  get ? ( io Float64 v<> )
  get ? ( io Float64 v<>, in UInt32 o )
  get ? ( io Float64 v[] )
  get ? ( io Float64 v[], in UInt32 o )
SInt32 getAngle ? ()
Vec3_i getXaxis ? ()
Vec3_i getYaxis ? ()
Vec3_i getZaxis ? ()
UInt32 hash ? ()
Quat_i inverse ? ()
SInt32 length ? ()
SInt32 lengthSquared ? ()
Quat_i linearInterpolate ? ( in Quat_i other, in SInt32 t )
  mirror ! ( in Integer axisIndex )
Quat_i multiply ? ( in Quat_i other )
Quat_i multiplySInt32 ? ( in SInt32 other )
Vec3_i rotateVector ? ( in Vec3_i v )
  set ! ( in Float32 v<> )
  set ! ( in Float32 v<>, in UInt32 o )
  set ! ( in Float64 v<> )
  set ! ( in Float64 v<>, in UInt32 o )
  set ! ( in SInt32 w, in Vec3_i v )
  set ! ( in SInt32 x, in SInt32 y, in SInt32 z, in SInt32 w )
  set ! ( in Vec3_i v, in SInt32 w )
Quat_i setFrom2Vectors ! ( in Vec3_i sourceDirVec, in Vec3_i destDirVec )
Quat_i setFrom2Vectors ! ( in Vec3_i sourceDirVec, in Vec3_i destDirVec, in Boolean arbitraryIfAmbiguous )
Quat_i setFromAxisAndAngle ! ( in Vec3_i axis, in SInt32 angle )
Quat_i setFromDirectionAndUpvector ! ( in Vec3_i direction, in Vec3_i upvector )
Quat_i setFromEuler_i ! ( in Euler_i e )
Quat_i setFromEuler_iAngles ! ( in SInt32 eulerX, in SInt32 eulerY, in SInt32 eulerZ )
Quat_i setFromEuler_iAngles ! ( in SInt32 eulerX, in SInt32 eulerY, in SInt32 eulerZ, in RotationOrder ro )
Quat_i setFromEuler_iAngles ! ( in Vec3_i angles )
Quat_i setFromEuler_iAngles ! ( in Vec3_i angles, in RotationOrder ro )
Quat_i setFromMat33_i ! ( in Mat33_i mat )
  setIdentity ! ()
SInt32 setUnit ! ()
Quat_i sphericalLinearInterpolate ? ( in Quat_i q2, in SInt32 t )
Quat_i subtract ? ( in Quat_i other )
Euler_i toEuler_i ? ( in RotationOrder rotationOrder )
Vec3_i toEuler_iAngles ? ( in RotationOrder order )
Vec3_i toEuler_iAngles ? ()
Mat33_i toMat33_i ? ()
Quat_i unit ? ()
Quat_i unit_safe ? ()

Operators

Quat_i = ( Param other )

Functions

mathRandomQuat_i

Quat_i mathRandomQuat_i ( in Size seed, in Size index, in Float32 min, in Float32 max )