Quaternion

A quaternion.

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

Members

Functions

add
void add(graphene.quaternion.Quaternion b, graphene.quaternion.Quaternion res)

Adds two #graphene_quaternion_t a and b.

dot
float dot(graphene.quaternion.Quaternion b)

Computes the dot product of two #graphene_quaternion_t.

equal
bool equal(graphene.quaternion.Quaternion b)

Checks whether the given quaternions are equal.

initFromAngleVec3
graphene.quaternion.Quaternion initFromAngleVec3(float angle, graphene.vec3.Vec3 axis)

Initializes a #graphene_quaternion_t using an angle on a specific axis.

initFromAngles
graphene.quaternion.Quaternion initFromAngles(float degX, float degY, float degZ)

Initializes a #graphene_quaternion_t using the values of the Euler angles on each axis.

initFromEuler
graphene.quaternion.Quaternion initFromEuler(graphene.euler.Euler e)

Initializes a #graphene_quaternion_t using the given #graphene_euler_t.

initFromMatrix
graphene.quaternion.Quaternion initFromMatrix(graphene.matrix.Matrix m)

Initializes a #graphene_quaternion_t using the rotation components of a transformation matrix.

initFromQuaternion
graphene.quaternion.Quaternion initFromQuaternion(graphene.quaternion.Quaternion src)

Initializes a #graphene_quaternion_t with the values from src.

initFromRadians
graphene.quaternion.Quaternion initFromRadians(float radX, float radY, float radZ)

Initializes a #graphene_quaternion_t using the values of the Euler angles on each axis.

initFromVec4
graphene.quaternion.Quaternion initFromVec4(graphene.vec4.Vec4 src)

Initializes a #graphene_quaternion_t with the values from src.

initIdentity
graphene.quaternion.Quaternion initIdentity()

Initializes a #graphene_quaternion_t using the identity transformation.

init_
graphene.quaternion.Quaternion init_(float x, float y, float z, float w)

Initializes a #graphene_quaternion_t using the given four values.

invert
void invert(graphene.quaternion.Quaternion res)

Inverts a #graphene_quaternion_t, and returns the conjugate quaternion of q.

multiply
void multiply(graphene.quaternion.Quaternion b, graphene.quaternion.Quaternion res)

Multiplies two #graphene_quaternion_t a and b.

normalize
void normalize(graphene.quaternion.Quaternion res)

Normalizes a #graphene_quaternion_t.

scale
void scale(float factor, graphene.quaternion.Quaternion res)

Scales all the elements of a #graphene_quaternion_t q using the given scalar factor.

slerp
void slerp(graphene.quaternion.Quaternion b, float factor, graphene.quaternion.Quaternion res)

Interpolates between the two given quaternions using a spherical linear interpolation, or SLERP, using the given interpolation factor.

toAngleVec3
void toAngleVec3(float angle, graphene.vec3.Vec3 axis)

Converts a quaternion into an angle, axis pair.

toAngles
void toAngles(float degX, float degY, float degZ)

Converts a #graphene_quaternion_t to its corresponding rotations on the Euler angles on each axis.

toMatrix
void toMatrix(graphene.matrix.Matrix m)

Converts a quaternion into a transformation matrix expressing the rotation defined by the #graphene_quaternion_t.

toRadians
void toRadians(float radX, float radY, float radZ)

Converts a #graphene_quaternion_t to its corresponding rotations on the Euler angles on each axis.

toVec4
void toVec4(graphene.vec4.Vec4 res)

Copies the components of a #graphene_quaternion_t into a #graphene_vec4_t.

Static functions

alloc
graphene.quaternion.Quaternion alloc()

Allocates a new #graphene_quaternion_t.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.