MTQuaternion

This class represents a quaternion defined by the four parameters x, y, z and w.

Methods:

* getter
-(double)x

-(double)y

-(double)z

-(double)w

returns the coordinates
-(MTMatrix44*)rotationMatrix returns the rotation matrix (4.3)
* operations
-(MTQuaternion*)invert
-(id)normalize $sqrt(x^{2}+y^{2}+z^{2}+w^{2})=1$
-(id)rotate: (double)phi rotates this quaternion by the given angle phi
-(id)multiplyWith: (MTQuaternion*)q2 combines two quaternions
* creation
+(MTQuaternion*)rotation: (double)phi aroundAxis:(MTCoordinates*)ax creates a new quaternion which represents the rotation around an axis (3.9)
+(MTQuaternion*)identity creates a new quaternion with coordinates: (0,0,0) and w=1.0.

moltalk@moltalk.org      version of this document: V3.0