graphene.quaternion
Module for [Quaternion] struct
struct Quaternion
Types 1
structQuaternion
A quaternion.
The contents of the #graphene_quaternion_t structure are private and should never be accessed directly.
Fields
float xfloat yfloat zfloat wMethods
void * boxCopy() nothrowvoid add(graphene.quaternion.Quaternion b, out graphene.quaternion.Quaternion res) nothrowAdds two #graphene_quaternion_t `a` and `b`.float dot(graphene.quaternion.Quaternion b) nothrowComputes the dot product of two #graphene_quaternion_t.graphene.quaternion.Quaternion init_(float x, float y, float z, float w) nothrowInitializes a #graphene_quaternion_t using the given four values.graphene.quaternion.Quaternion initFromAngleVec3(float angle, graphene.vec3.Vec3 axis) nothrowInitializes a #graphene_quaternion_t using an angle on a specific axis.graphene.quaternion.Quaternion initFromAngles(float degX, float degY, float degZ) nothrowInitializes a #graphene_quaternion_t using the values of the [Euler angles](http://en.wikipedia.org/wiki/Euler_angles) on each axis.graphene.quaternion.Quaternion initFromEuler(graphene.euler.Euler e) nothrowInitializes a #graphene_quaternion_t using the given #graphene_euler_t.graphene.quaternion.Quaternion initFromMatrix(graphene.matrix.Matrix m) nothrowInitializes a #graphene_quaternion_t using the rotation components of a transformation matrix.graphene.quaternion.Quaternion initFromQuaternion(graphene.quaternion.Quaternion src) nothrowInitializes a #graphene_quaternion_t with the values from src.graphene.quaternion.Quaternion initFromRadians(float radX, float radY, float radZ) nothrowInitializes a #graphene_quaternion_t using the values of the [Euler angles](http://en.wikipedia.org/wiki/Euler_angles) on each axis.graphene.quaternion.Quaternion initFromVec4(graphene.vec4.Vec4 src) nothrowInitializes a #graphene_quaternion_t with the values from src.graphene.quaternion.Quaternion initIdentity() nothrowInitializes a #graphene_quaternion_t using the identity transformation. Returns: the initialized quaternionvoid invert(out graphene.quaternion.Quaternion res) nothrowInverts a #graphene_quaternion_t, and returns the conjugate quaternion of `q`.void multiply(graphene.quaternion.Quaternion b, out graphene.quaternion.Quaternion res) nothrowMultiplies two #graphene_quaternion_t `a` and `b`.void scale(float factor, out graphene.quaternion.Quaternion res) nothrowScales all the elements of a #graphene_quaternion_t `q` using the given scalar factor.void slerp(graphene.quaternion.Quaternion b, float factor, out graphene.quaternion.Quaternion res) nothrowInterpolates between the two given quaternions using a spherical linear interpolation, or [SLERP](http://en.wikipedia.org/wiki/Slerp), using the given interpolation factor.void toAngleVec3(out float angle, out graphene.vec3.Vec3 axis) nothrowConverts a quaternion into an angle, axis pair.void toAngles(out float degX, out float degY, out float degZ) nothrowConverts a #graphene_quaternion_t to its corresponding rotations on the [Euler angles](http://en.wikipedia.org/wiki/Euler_angles) on each axis.void toMatrix(out graphene.matrix.Matrix m) nothrowConverts a quaternion into a transformation matrix expressing the rotation defined by the #graphene_quaternion_t.void toRadians(out float radX, out float radY, out float radZ) nothrowConverts a #graphene_quaternion_t to its corresponding rotations on the [Euler angles](http://en.wikipedia.org/wiki/Euler_angles) on each axis.void toVec4(out graphene.vec4.Vec4 res) nothrowCopies the components of a #graphene_quaternion_t into a #graphene_vec4_t.