Quaternion

四元数を扱うクラス

voidQuaternion(void)
voidQuaternion(double,double,double,double)
Quaternionclone(void)
doubledot(Quaternion)
boolequals(Quaternion)
thisinit(void)
thisinvert(void)
thismul(Quaternion)
thisnormalize(void)
thissetRotate(Vector3,double)
thissetRotateX(double)
thissetRotateY(double)
thissetRotateZ(double)
thissetVectorToVector(Vector3,Vector3)
thisslerp(Quaternion,double)
Matrix4toMatrix4(void)

Property

double x;
double y;
double z;
double w;

Function


Quaternion(void)

Quaternion(double,double,double,double)

//example
var q0 = Quaternion();
var q1 = Quaternion(0,0,0,1);

clone(void)

return Quaternion


dot(Quaternion)

return double


equals(Quaternion)

return bool


init(void)

return this


invert(void)

return this


mul(Quaternion)

return this


normalize(void)

return this


setRotate(Vector3,double)

return this


setRotateX(double)

return this


setRotateY(double)

return this


setRotateZ(double)

return this


setVectorToVector(Vector3,Vector3)

return this


slerp(Vector3,double)

return this


toMatrix4(void)

return Matrix4