00001
00002
00003
00004
00005
00006
00007
00008
00009 #import <Cocoa/Cocoa.h>
00010 #import "O3D_Vector3.h"
00011 #import "O3D_Matrix.h"
00012
00014 @interface O3D_Quaternion : NSObject {
00015 float x, y, z, w;
00016 }
00017
00018 @property (nonatomic) float x, y, z, w;
00019
00021 - (id) initFromAxis:(O3D_Vector3 *)axis angle:(float)angle;
00023 - (id) initWithQuaternion:(O3D_Quaternion *)aq;
00024
00026 + (O3D_Quaternion *) quaternion;
00027
00029 + (O3D_Quaternion *) quaternionWithQuaternion:(O3D_Quaternion *)aq;
00030
00032 + (O3D_Quaternion *) quaternionFromAxis:(O3D_Vector3 *)axis angle:(float)angle;
00033
00035 - (O3D_Matrix *) matrix;
00036
00038 - (NSDictionary *) axisAngle;
00039
00041 - (O3D_Vector3 *) vectorX;
00043 - (O3D_Vector3 *) vectorY;
00045 - (O3D_Vector3 *) vectorZ;
00046
00048 - (void) invert;
00050 - (void) normalize;
00052 - (void) multiplyByQuaternion:(O3D_Quaternion *)q2;
00054 - (void) rotateWithAxis:(O3D_Vector3 *)axis angle:(float)angle;
00055
00056 @end