Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GrapheneEuler

[30:7] extends: object

Describe a rotation using Euler angles. The contents of the #graphene_euler_t structure are private and should never be accessed directly.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GrapheneEuler (Handle = null)

    Allocates a new #graphene_euler_t. The contents of the returned structure are undefined.

    • @p Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • equal (object b)

    Checks if two #graphene_euler_t are equal.

    • @p b is a #graphene_euler_t.
    • @r true if the two #graphene_euler_t are equal.
  • free ()

    Frees the resources allocated by graphene_euler_alloc().

    • @r None.
  • get_alpha ()

    Retrieves the first component of the Euler angle vector, depending on the order of rotation. See also: graphene_euler_get_x()

    • @r the first component of the Euler angle vector, in radians.
  • get_beta ()

    Retrieves the second component of the Euler angle vector, depending on the order of rotation. See also: graphene_euler_get_y()

    • @r the second component of the Euler angle vector, in radians.
  • get_gamma ()

    Retrieves the third component of the Euler angle vector, depending on the order of rotation. See also: graphene_euler_get_z()

    • @r the third component of the Euler angle vector, in radians.
  • get_order ()

    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.

    • @r the order used to apply the rotations.
  • get_x ()

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

    • @r the rotation angle.
  • get_y ()

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

    • @r the rotation angle.
  • get_z ()

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

    • @r the rotation angle.
  • init (double x, double y, double z)

    Initializes a #graphene_euler_t using the given angles. The order of the rotations is %GRAPHENE_EULER_ORDER_DEFAULT.

    • @p x is rotation angle on the X axis, in degrees.
    • @p y is rotation angle on the Y axis, in degrees.
    • @p z is rotation angle on the Z axis, in degrees.
    • @r the initialized #graphene_euler_t.
  • init_from_euler (object src)

    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.

    • @p src is a #graphene_euler_t.
    • @r the initialized #graphene_euler_t.
  • init_from_matrix (object m, string order)

    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.

    • @p m is a rotation matrix.
    • @p order is the order used to apply the rotations.
    • @r the initialized #graphene_euler_t.
  • init_from_quaternion (object q, string order)

    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.

    • @p q is a normalized #graphene_quaternion_t.
    • @p order is the order used to apply the rotations.
    • @r the initialized #graphene_euler_t.
  • init_from_radians (double x, double y, double z, string order)

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

    • @p x is rotation angle on the X axis, in radians.
    • @p y is rotation angle on the Y axis, in radians.
    • @p z is rotation angle on the Z axis, in radians.
    • @p order is order of rotations.
    • @r the initialized #graphene_euler_t.
  • init_from_vec3 (object v, string order)

    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.

    • @p v is a #graphene_vec3_t containing the rotation angles in degrees.
    • @p order is the order used to apply the rotations.
    • @r the initialized #graphene_euler_t.
  • init_with_order (double x, double y, double z, string order)

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

    • @p x is rotation angle on the X axis, in degrees.
    • @p y is rotation angle on the Y axis, in degrees.
    • @p z is rotation angle on the Z axis, in degrees.
    • @p order is the order used to apply the rotations.
    • @r the initialized #graphene_euler_t.
  • reorder (string order)

    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.

    • @p order is the new order.
    • @p res is return location for the reordered #graphene_euler_t.
    • @r None.
  • to_matrix ()

    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.

    • @p res is return location for a #graphene_matrix_t.
    • @r None.
  • to_quaternion ()

    Converts a #graphene_euler_t into a #graphene_quaternion_t.

    • @p res is return location for a #graphene_quaternion_t.
    • @r None.
  • to_vec3 ()

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

    • @p res is return location for a #graphene_vec3_t.
    • @r None.

class: GrapheneEulerLayout

[13:14] static extends: object

Generated struct layout helper for GIR record Euler.

Methods

  • layout ()

    Returns the Panama struct layout for Euler.