Quaternion

class Quaternion(val grapheneQuaternionPointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

A quaternion.

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

Skipped during bindings generation

  • parameter angle: angle: Out parameter is not supported

  • parameter deg_x: deg_x: Out parameter is not supported

  • parameter rad_x: rad_x: Out parameter is not supported

Since

1.0

Constructors

Link copied to clipboard
constructor()

Allocate a new Quaternion.

constructor(scope: <Error class: unknown class>)

Allocate a new Quaternion using the provided AutofreeScope.

constructor(grapheneQuaternionPointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val grapheneQuaternionPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun add(b: Quaternion, res: Quaternion)

Adds two #graphene_quaternion_t @a and @b.

Link copied to clipboard
fun dot(b: Quaternion): <Error class: unknown class>

Computes the dot product of two #graphene_quaternion_t.

Link copied to clipboard

Checks whether the given quaternions are equal.

Link copied to clipboard
fun free()

Releases the resources allocated by graphene_quaternion_alloc().

Link copied to clipboard
fun init(x: <Error class: unknown class>, y: <Error class: unknown class>, z: <Error class: unknown class>, w: <Error class: unknown class>): Quaternion

Initializes a #graphene_quaternion_t using the given four values.

Link copied to clipboard
fun initFromAngles(degX: <Error class: unknown class>, degY: <Error class: unknown class>, degZ: <Error class: unknown class>): Quaternion

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

Link copied to clipboard
fun initFromAngleVec3(angle: <Error class: unknown class>, axis: Vec3): Quaternion

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

Link copied to clipboard

Initializes a #graphene_quaternion_t using the given #graphene_euler_t.

Link copied to clipboard

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

Link copied to clipboard

Initializes a #graphene_quaternion_t with the values from @src.

Link copied to clipboard
fun initFromRadians(radX: <Error class: unknown class>, radY: <Error class: unknown class>, radZ: <Error class: unknown class>): Quaternion

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

Link copied to clipboard

Initializes a #graphene_quaternion_t with the values from @src.

Link copied to clipboard

Initializes a #graphene_quaternion_t using the identity transformation.

Link copied to clipboard
fun invert(res: Quaternion)

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

Link copied to clipboard

Multiplies two #graphene_quaternion_t @a and @b.

Link copied to clipboard

Normalizes a #graphene_quaternion_t.

Link copied to clipboard
fun scale(factor: <Error class: unknown class>, res: Quaternion)

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

Link copied to clipboard
fun slerp(b: Quaternion, factor: <Error class: unknown class>, res: Quaternion)

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

Link copied to clipboard

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

Link copied to clipboard
fun toVec4(res: Vec4)

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