Class (GI Struct)

Graphene-1.0GrapheneQuaternionSince 1.0

A quaternion.

The contents of the Graphene.Quaternion structure are private and should never be accessed directly.

1.0

Index

Constructors

Properties

$gtype: GType<Quaternion>

Methods

  • Initializes a Graphene.Quaternion using the given four values.

    Parameters

    • x: number

      the first component of the quaternion

    • y: number

      the second component of the quaternion

    • z: number

      the third component of the quaternion

    • w: number

      the fourth component of the quaternion

    Returns Quaternion

    the initialized quaternion

  • Initializes a Graphene.Quaternion using the values of the Euler angles on each axis.

    See also: graphene_quaternion_init_from_euler()

    Parameters

    • deg_x: number

      rotation angle on the X axis (yaw), in degrees

    • deg_y: number

      rotation angle on the Y axis (pitch), in degrees

    • deg_z: number

      rotation angle on the Z axis (roll), in degrees

    Returns Quaternion

    the initialized quaternion

  • Initializes a Graphene.Quaternion using the values of the Euler angles on each axis.

    See also: graphene_quaternion_init_from_euler()

    Parameters

    • rad_x: number

      rotation angle on the X axis (yaw), in radians

    • rad_y: number

      rotation angle on the Y axis (pitch), in radians

    • rad_z: number

      rotation angle on the Z axis (roll), in radians

    Returns Quaternion

    the initialized quaternion