Quat_d.kl

Types

Quat_d (struct)

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

参考

Xfo, Euler_d, Mat33_d

/*
** Example: Quat_d
*/

// create several quaternions
Quat_d q0, q1, q2, q3, q4;
q0 = Quat_d(Vec3_d(1.0, 0.0, 0.0), 0.0);
q1.setFromEuler_d(Euler_d(PI, 0.0, 0.0));
q2.setFromDirectionAndUpvector(Vec3_d(1.0, 0.0, 0.0), Vec3_d(0.0, 1.0, 0.0));
q3.setFrom2Vectors(Vec3_d(1.0, 0.0, 0.0), Vec3_d(1.0, 1.0, 0.0));
q4.setFromAxisAndAngle(Vec3_d(0.0, 1.0, 0.0), HALF_PI);

Members

Vec3_d v  
Float64 w  

Methods

  Quat_d ( in Euler_d e )
  Quat_d ( in Float64 w, in Vec3_d v )
  Quat_d ( in Float64 x, in Float64 y, in Float64 z, in Float64 w )
  Quat_d ( in Mat33_d mat )
  Quat_d ( in Quat_d other )
  Quat_d ( in Vec3_d v, in Float64 w )
  Quat_d ()
Quat_d add ? ( in Quat_d other )
  alignWith ! ( in Quat_d other )
Boolean almostEqual ? ( in Quat_d other )
Boolean almostEqual ? ( in Quat_d other, in Float64 precision )
Quat_d clone ? ()
Quat_d conjugate ? ()
Quat_d divide ? ( in Quat_d other )
Quat_d divideFloat64 ? ( in Float64 other )
Float64 dot ? ( in Quat_d other )
Boolean equal ? ( in Quat_d 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 )
Float64 getAngle ? ()
Vec3_d getXaxis ? ()
Vec3_d getYaxis ? ()
Vec3_d getZaxis ? ()
UInt32 hash ? ()
Quat_d inverse ? ()
Float64 length ? ()
Float64 lengthSquared ? ()
Quat_d linearInterpolate ? ( in Quat_d other, in Float64 t )
  mirror ! ( in Integer axisIndex )
Quat_d multiply ? ( in Quat_d other )
Quat_d multiplyFloat64 ? ( in Float64 other )
Vec3_d rotateVector ? ( in Vec3_d 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 Float64 w, in Vec3_d v )
  set ! ( in Float64 x, in Float64 y, in Float64 z, in Float64 w )
  set ! ( in Vec3_d v, in Float64 w )
Quat_d setFrom2Vectors ! ( in Vec3_d sourceDirVec, in Vec3_d destDirVec )
Quat_d setFrom2Vectors ! ( in Vec3_d sourceDirVec, in Vec3_d destDirVec, in Boolean arbitraryIfAmbiguous )
Quat_d setFromAxisAndAngle ! ( in Vec3_d axis, in Float64 angle )
Quat_d setFromDirectionAndUpvector ! ( in Vec3_d direction, in Vec3_d upvector )
Quat_d setFromEuler_d ! ( in Euler_d e )
Quat_d setFromEuler_dAngles ! ( in Float64 eulerX, in Float64 eulerY, in Float64 eulerZ )
Quat_d setFromEuler_dAngles ! ( in Float64 eulerX, in Float64 eulerY, in Float64 eulerZ, in RotationOrder ro )
Quat_d setFromEuler_dAngles ! ( in Vec3_d angles )
Quat_d setFromEuler_dAngles ! ( in Vec3_d angles, in RotationOrder ro )
Quat_d setFromMat33_d ! ( in Mat33_d mat )
  setIdentity ! ()
Float64 setUnit ! ()
Quat_d sphericalLinearInterpolate ? ( in Quat_d q2, in Float64 t )
Quat_d subtract ? ( in Quat_d other )
Euler_d toEuler_d ? ( in RotationOrder rotationOrder )
Vec3_d toEuler_dAngles ? ( in RotationOrder order )
Vec3_d toEuler_dAngles ? ()
Mat33_d toMat33_d ? ()
Quat_d unit ? ()
Quat_d unit_safe ? ()

Operators

Quat_d = ( Param other )

Functions

mathRandomQuat_d

Quat_d mathRandomQuat_d ( in Size seed, in Size index, in Float32 min, in Float32 max )