Constructors

  • Create one instance of this class

    Parameters

    • x: number = 0

      (optional) the angle of the x axis in radians. Default is 0.

    • y: number = 0

      (optional) the angle of the y axis in radians. Default is 0.

    • z: number = 0

      (optional) the angle of the z axis in radians. Default is 0.

    • order: string = AcGeEuler.DEFAULT_ORDER

      (optional) a string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).

    Returns AcGeEuler

Properties

DEFAULT_ORDER: string = 'XYZ'

Accessors

  • get order(): string
  • The order in which to apply rotations. Default is 'XYZ', which means that the object will first be rotated around its X axis, then its Y axis and finally its Z axis. Other possibilities are: 'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. These must be in upper case.

    It uses intrinsic Tait-Bryan angles. This means that rotations are performed with respect to the local coordinate system. That is, for order 'XYZ', the rotation is first around the local-X axis (which is the same as the world-X axis), then around local-Y (which may now be different from the world Y-axis), then local-Z (which may be different from the world Z-axis).

    Returns string

  • set order(value: string): void
  • Parameters

    • value: string

    Returns void

Methods

  • Returns Generator<string | number, void, unknown>

  • Check for strict equality of this euler and euler.

    Parameters

    Returns boolean

    Return true if the specified euler and this euler represent the same rotation.

  • Set this euler from the specified array.

    Parameters

    • array: (string | number)[]

      Input an array of length 3 or 4. The optional 4th argument corresponds to the order.

      • Assign this euler's x angle to array[0].
      • Assign this euler's y angle to array[1].
      • Assign this euler's z angle to array[2].
      • Optionally assign this euler's order to array[3].

    Returns AcGeEuler

  • Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order.

    Parameters

    • newOrder: string

      Input the new order that the rotations are applied.

    Returns AcGeEuler

    Return this euler

  • Set the angles of this euler transform and optionally the order.

    Parameters

    • x: number

      (optional) the angle of the x axis in radians. Default is 0.

    • y: number

      (optional) the angle of the y axis in radians. Default is 0.

    • z: number

      (optional) the angle of the z axis in radians. Default is 0.

    • order: string = ...

      (optional) a string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).

    Returns AcGeEuler

    Return this euler

  • Set this urler from the specified quaternion.

    Parameters

    • q: AcGeQuaternion

      Input a normalized quaternion.

    • order: string

      (optional) a string representing the order that the rotations are applied. Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.

    • update: boolean = true

      Input one flag to indicate whether to trigger change callback function

    Returns AcGeEuler

    Return this euler

  • Set this euler by exatracting rotation information from the specified matrix.

    Parameters

    • m: AcGeMatrix3d

      Input a Matrix4 of which the upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled).

    • order: string = ...

      (optional) a string representing the order that the rotations are applied. Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.

    • update: boolean = true

      Input one flag to indicate whether to trigger change callback function

    Returns AcGeEuler

    Return this euler

  • Set the x, y and z, and optionally update the order.

    Parameters

    • v: AcGeVector3d

      Input one 3d vector

    • order: string = ...

      Input a optional string representing the order that the rotations are applied.

    Returns AcGeEuler

    Return this euler

  • Return an array of the form [x, y, z, order ].

    Parameters

    • array: (string | number)[] = []

      Input an optional array to store the euler in.

    • offset: number = 0

      Input an optional offset in the array.

    Returns (string | number)[]

    Return an array of the form [x, y, z, order].