home
 
 index of namespace default
 
 index of project tkmath
 
 index of module tkmath

Class tkmath.Quaternionf


SynopsisThis class represents a single precision quaternion of the form a+ib+jc+kd.

  Base classes:
  Methods:
Method add
add quaternion v to this instance
Signature
add(Quaternionfv)
Arguments
Quaternionfvquaternion value to add

 
 top of page
Method conjMul
Multiply this conjugated instance with quaternion v (Grassmann product)
Signature
conjMul(Quaternionfv)
Arguments
Quaternionfvquaternion value to multiply

 
 top of page
Method dot
Calculate dot product (inner product) of this instance and quaternion v
Signature
dot(Quaternionfv)
 :float
Arguments
Quaternionfvquaternion value to multiply
Returns
floatdot product of quaternions

 
 top of page
Method getAbs
Return the absolute value of this instance
Signature
getAbs():float
Returns
floatlength of quaternion

 
 top of page
Method getAbsSqr
Return the squared length of this instance
Signature
getAbsSqr():float
Returns
floatlength2 of this instance

 
 top of page
Method getAngle
Calculate quaternion angle
Signature
getAngle():float
Returns
floatquaternion angle

 
 top of page
Method getI
Get imaginery i value
Signature
getI():float
Returns
floatimaginery i value

 
 top of page
Method getJ
Get imaginery j value
Signature
getJ():float
Returns
floatimaginery j value

 
 top of page
Method getK
Get imaginery k value
Signature
getK():float
Returns
float
Description
qreturn imaginery k value

 
 top of page
Method getMatrix4f
Get 4x4 matrix representation of quaternion
Signature
getMatrix4f():Matrix4f
Returns
Matrix4fmatrix representation of quaternion

 
 top of page
Method getPureUnit
Returns pure unit quaternion from instance
Signature
getPureUnit():Quaternionf
Returns
Quaternionfpure unit quaternion

 
 top of page
Method getR
Get Real value
Signature
getR():float
Returns
floatreal value

 
 top of page
Method getRadius
Calculate quaternion radius (_getAbs)
Signature
getRadius():float
Returns
floatlength of quaternion

 
 top of page
Method getRotateMatrix4f
Get 4x4 rotation matrix representation of quaternion q*conj q
Signature
getRotateMatrix4f():Matrix4f
Returns
Matrix4frotation matrix representation of quaternion

 
 top of page
Method getString
Get string representation of quaternion number (a+ib+jc+kd)
Signature
getString():String
Returns
Stringstring representation (a+ib+jc+kd)

 
 top of page
Method getV
Get vector value
Signature
getV():Vector3f
Returns
Vector3fvector part

 
 top of page
Method init
Init quaternion to a+ib+jc+kd
Signature
init(floata,
  floatb,
  floatc,
  floatd 
  )  
Arguments
floatanew real value
floatbnew i value
floatcnew j value
floatdnew k value

 
 top of page
Method invert
Calculate the reciprocal value 1/q
Signature
invert()

 
 top of page
Method mul
Multiply this instance with quaternion v (Grassmann product)
Signature
mul(Quaternionfv)
Arguments
Quaternionfvquaternion value to multiply

 
 top of page
Method mulConj
Multiply this instance with conjugated quaternion v (Grassmann product)
Signature
mulConj(Quaternionfv)
Arguments
Quaternionfvconjugated quaternion value to multiply

 
 top of page
Method mulf
Multiply this instance with scalar v
Signature
mulf(floatv)
Arguments
floatvscalar value to multiply

 
 top of page
Method New
Init quaternion to a+ib+jc+kd and return new instance
Signature
New(floata,
  floatb,
  floatc,
  floatd 
  )  
 :Quaternionf
Arguments
floatanew real value
floatbnew i value
floatcnew j value
floatdnew k value
Returns

 
 top of page
Method outer
Calculate the outer product of this instance and quaternion v
Signature
Arguments
Quaternionfvquaternion value to multiply
Returns
Quaternionfouter product of quaternions

 
 top of page
Method setAngle
Set new quaternion angle
Signature
setAngle(floata)
Arguments
floatanew angle

 
 top of page
Method setI
Set imaginery i part to a
Signature
setI(floata)
Arguments
floatanew value for imaginery i value

 
 top of page
Method setJ
Set imaginery j part to a
Signature
setJ(floata)
Arguments
floatanew value for imaginery j value

 
 top of page
Method setK
Set imagnery k part to a
Signature
setK(floata)
Arguments
floatanew value for imaginery k value

 
 top of page
Method setPureUnit
Set new pure unit vector of quaternion
Signature
setPureUnit(Quaternionfv)
Arguments
Quaternionfvpure unit quaternion with real part zero and length 1

 
 top of page
Method setR
Set real part to a
Signature
setR(floata)
Arguments
floatanew value for real value

 
 top of page
Method setRadius
Set new quaternion radius
Signature
setRadius(floata)
Arguments
floatanew length

 
 top of page
Method setV
Set vector part to v
Signature
setV(Vector3fv)
Arguments
Vector3fvnew value for vector part

 
 top of page
Method sub
substract quaternion v from this instance
Signature
sub(Quaternionfv)
Arguments
Quaternionfvquaternion value to substract

 
 top of page
Method unit
Set length of quaternion to 1
Signature
unit()

 
 top of page
Method unitScale
Set length of quaternion to s
Signature
unitScale(floats)
Arguments
floatsnew length

 
 top of page
 

Project Modules:tkmath 
Project Classes:Complexd , Complexf , Math , Matrix , Matrix2d , Matrix2f , Matrix3d , Matrix3f , Matrix4d , Matrix4f , Quaterniond , Quaternionf , Vector2d , Vector2f , Vector3d , Vector3f , Vector4d , Vector4f 
Project Functions:absd , absf , acoscd , acoscf , acosd , acosf , acoshcd , acoshcf , acoshd , acoshf , asincd , asincf , asind , asinf , asinhcd , asinhcf , asinhd , asinhf , atan2d , atan2f , atancd , atancf , atand , atanf , atanhcd , atanhcf , atanhd , atanhf , ceild , ceilf , complexd , complexf , complexfPolar , complexfPolar , coscd , coscf , cosd , cosf , coshcd , coshcf , coshd , coshf , exp10d , exp10f , exp2d , exp2f , expcd , expcf , expd , expf , floord , floorf , hypotd , hypotf , log10d , log10f , log2d , log2f , logcd , logcf , logd , logf , matrix2d , matrix2f , matrix3d , matrix3f , matrix4d , matrix4f , modd , modf , powcd , powcf , powd , powf , quaterniond , quaternionf , relCmpd , relCmpf , relErrCmpd , relErrCmpf , roundd , roundf , sincd , sincf , sind , sinf , sinhcd , sinhcf , sinhd , sinhf , sqrtcd , sqrtcf , sqrtd , sqrtf , tancf , tancf , tand , tanf , tanhcd , tanhcf , tanhd , tanhf , vector2d , vector2f , vector3d , vector3f , vector4d , vector4f 
All Namespaces:default , ui 
All Projects:core , debugtext , tkfreetype2 , tkmath , tkmidi , tkopengl , tkportaudio , tksdl , tkui , tkunit 


auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 13:15:54