graphene.quaternion

Module for [Quaternion] struct

struct Quaternion

Types 1

A quaternion.

The contents of the #graphene_quaternion_t structure are private and should never be accessed directly.

Fields
float x
float y
float z
float w
Methods
GType _gType() @property
void * boxCopy()
void add(graphene.quaternion.Quaternion b, out graphene.quaternion.Quaternion res)Adds two #graphenequaterniont `a` and `b`.
float dot(graphene.quaternion.Quaternion b)Computes the dot product of two #graphenequaterniont.
bool equal(graphene.quaternion.Quaternion b)Checks whether the given quaternions are equal.
graphene.quaternion.Quaternion init_(float x, float y, float z, float w)Initializes a #graphenequaterniont using the given four values.
graphene.quaternion.Quaternion initFromAngleVec3(float angle, graphene.vec3.Vec3 axis)Initializes a #graphenequaterniont using an angle on a specific axis.
graphene.quaternion.Quaternion initFromAngles(float degX, float degY, float degZ)Initializes a #graphenequaterniont 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)Initializes a #graphenequaterniont using the given #grapheneeulert.
graphene.quaternion.Quaternion initFromMatrix(graphene.matrix.Matrix m)Initializes a #graphenequaterniont using the rotation components of a transformation matrix.
graphene.quaternion.Quaternion initFromQuaternion(graphene.quaternion.Quaternion src)Initializes a #graphenequaterniont with the values from src.
graphene.quaternion.Quaternion initFromRadians(float radX, float radY, float radZ)Initializes a #graphenequaterniont 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)Initializes a #graphenequaterniont with the values from src.
graphene.quaternion.Quaternion initIdentity()Initializes a #graphenequaterniont using the identity transformation. Returns: the initialized quaternion
void invert(out graphene.quaternion.Quaternion res)Inverts a #graphenequaterniont, and returns the conjugate quaternion of `q`.
void multiply(graphene.quaternion.Quaternion b, out graphene.quaternion.Quaternion res)Multiplies two #graphenequaterniont `a` and `b`.
void normalize(out graphene.quaternion.Quaternion res)Normalizes a #graphenequaterniont.
void scale(float factor, out graphene.quaternion.Quaternion res)Scales all the elements of a #graphenequaterniont `q` using the given scalar factor.
void slerp(graphene.quaternion.Quaternion b, float factor, out graphene.quaternion.Quaternion res)Interpolates 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)Converts a quaternion into an angle, axis pair.
void toAngles(out float degX, out float degY, out float degZ)Converts a #graphenequaterniont 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)Converts a quaternion into a transformation matrix expressing the rotation defined by the #graphenequaterniont.
void toRadians(out float radX, out float radY, out float radZ)Converts a #graphenequaterniont 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)Copies the components of a #graphenequaterniont into a #graphenevec4t.