Gjsify LogoGjsify Logo

Represents an ordered rotation first of heading degrees around an object's y axis, then pitch degrees around an object's x axis and finally roll degrees around an object's z axis.

It's important to understand the that axis are associated with the object being rotated, so the axis also rotate in sequence with the rotations being applied.

The members of a #CoglEuler can be initialized, for example, with cogl_euler_init() and cogl_euler_init_from_quaternion ().

You may also want to look at cogl_quaternion_init_from_euler() if you want to do interpolation between 3d rotations.

record

Hierarchy

  • Euler

Index

Constructors

Properties

heading: number

Angle to rotate around an object's y axis

field
pitch: number

Angle to rotate around an object's x axis

field
roll: number

Angle to rotate around an object's z axis

field
name: string

Methods

  • Allocates a new #CoglEuler and initilizes it with the component angles of src. The newly allocated euler should be freed using cogl_euler_free().

    Returns Cogl.Euler

  • free(): void
  • init(heading: number, pitch: number, roll: number): void
  • Initializes euler to represent a rotation of x_angle degrees around the x axis, then y_angle degrees around the y_axis and z_angle degrees around the z axis.

    Parameters

    • heading: number

      Angle to rotate around an object's y axis

    • pitch: number

      Angle to rotate around an object's x axis

    • roll: number

      Angle to rotate around an object's z axis

    Returns void

  • Extracts a euler rotation from the given matrix and initializses euler with the component x, y and z rotation angles.

    Parameters

    • matrix: Cogl.Matrix

      A #CoglMatrix containing a rotation, but no scaling, mirroring or skewing.

    Returns void

  • Initializes a euler rotation with the equivalent rotation represented by the given quaternion.

    Parameters

    • quaternion: Cogl.Quaternion

      A #CoglEuler with the rotation to initialize with

    Returns void

  • equal(v1: object, v2: object): number
  • Compares the two given euler angles v1 and v1 and it they are equal returns %TRUE else %FALSE.

    This function only checks that all three components rotations are numerically equal, it does not consider that some rotations can be represented with different component rotations

    Parameters

    • v1: object

      The first euler angle to compare

    • v2: object

      The second euler angle to compare

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method