package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Euler

type t = [ `euler ] Gobject.obj
val alloc : unit -> t

Create a new Euler

val to_vec3 : t -> [ `vec3 ] Gobject.obj

Retrieves the angles of a #graphene_euler_t and initializes a #graphene_vec3_t with them.

val to_quaternion : t -> [ `quaternion ] Gobject.obj

Converts a #graphene_euler_t into a #graphene_quaternion_t.

val to_matrix : t -> [ `matrix ] Gobject.obj

Converts a #graphene_euler_t into a transformation matrix expressing the extrinsic composition of rotations described by the Euler angles.

The rotations are applied over the reference frame axes in the order associated with the #graphene_euler_t; for instance, if the order used to initialize @e is %GRAPHENE_EULER_ORDER_XYZ:

* the first rotation moves the body around the X axis with an angle φ * the second rotation moves the body around the Y axis with an angle of ϑ * the third rotation moves the body around the Z axis with an angle of ψ

The rotation sign convention is right-handed, to preserve compatibility between Euler-based, quaternion-based, and angle-axis-based rotations.

val reorder : t -> Graphene_enums.eulerorder -> t

Reorders a #graphene_euler_t using @order.

This function is equivalent to creating a #graphene_quaternion_t from the given #graphene_euler_t, and then converting the quaternion into another #graphene_euler_t.

val init_with_order : t -> float -> float -> float -> Graphene_enums.eulerorder -> t

Initializes a #graphene_euler_t with the given angles and @order.

val init_from_vec3 : t -> [ `vec3 ] Gobject.obj option -> Graphene_enums.eulerorder -> t

Initializes a #graphene_euler_t using the angles contained in a #graphene_vec3_t.

If the #graphene_vec3_t @v is %NULL, the #graphene_euler_t will be initialized with all angles set to 0.

val init_from_radians : t -> float -> float -> float -> Graphene_enums.eulerorder -> t

Initializes a #graphene_euler_t using the given angles and order of rotation.

val init_from_quaternion : t -> [ `quaternion ] Gobject.obj option -> Graphene_enums.eulerorder -> t

Initializes a #graphene_euler_t using the given normalized quaternion.

If the #graphene_quaternion_t @q is %NULL, the #graphene_euler_t will be initialized with all angles set to 0.

val init_from_matrix : t -> [ `matrix ] Gobject.obj option -> Graphene_enums.eulerorder -> t

Initializes a #graphene_euler_t using the given rotation matrix.

If the #graphene_matrix_t @m is %NULL, the #graphene_euler_t will be initialized with all angles set to 0.

val init_from_euler : t -> t option -> t

Initializes a #graphene_euler_t using the angles and order of another #graphene_euler_t.

If the #graphene_euler_t @src is %NULL, this function is equivalent to calling graphene_euler_init() with all angles set to 0.

val init : t -> float -> float -> float -> t

Initializes a #graphene_euler_t using the given angles.

The order of the rotations is %GRAPHENE_EULER_ORDER_DEFAULT.

val get_z : t -> float

Retrieves the rotation angle on the Z axis, in degrees.

val get_y : t -> float

Retrieves the rotation angle on the Y axis, in degrees.

val get_x : t -> float

Retrieves the rotation angle on the X axis, in degrees.

val get_order : t -> Graphene_enums.eulerorder

Retrieves the order used to apply the rotations described in the #graphene_euler_t structure, when converting to and from other structures, like #graphene_quaternion_t and #graphene_matrix_t.

This function does not return the %GRAPHENE_EULER_ORDER_DEFAULT enumeration value; it will return the effective order of rotation instead.

val get_gamma : t -> float

Retrieves the third component of the Euler angle vector, depending on the order of rotation.

See also: graphene_euler_get_z()

val get_beta : t -> float

Retrieves the second component of the Euler angle vector, depending on the order of rotation.

See also: graphene_euler_get_y()

val get_alpha : t -> float

Retrieves the first component of the Euler angle vector, depending on the order of rotation.

See also: graphene_euler_get_x()

val equal : t -> t -> bool

Checks if two #graphene_euler_t are equal.