Euler

Core.Euler exported from @manycore/aholo-viewer.

Core Class

Constructors

  • Parameters

    • x: number
    • y: number
    • z: number
    • order: string

    Returns Euler

Properties

_x: number

The angle of the x axis in radians.

_y: number

The angle of the y axis in radians.

_z: number

The angle of the z axis in radians.

_order: string

A string representing the order that the rotations are applied.

isEuler: boolean

Check the type whether it belongs to Euler. This value should not be changed by user.

onChangeCallback: Function

The function will be called when x, y z and order is changed.

RotationOrders: string[]

All possible value for order.

DefaultOrder: string

The default of order.

Accessors

  • get x(): number

    Returns number

  • set x(value: number): void

    Parameters

    • value: number

    Returns void

  • get y(): number

    Returns number

  • set y(value: number): void

    Parameters

    • value: number

    Returns void

  • get z(): number

    Returns number

  • set z(value: number): void

    Parameters

    • value: number

    Returns void

  • get order(): string

    Returns string

  • set order(value: string): void

    Parameters

    • value: string

    Returns void

Methods

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

    Parameters

    • x: number
    • y: number
    • z: number
    • order: string

    Returns Euler

  • Returns a new Euler with the same parameters as this one.

    Returns Euler

  • Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.

    Parameters

    • m: Matrix4

      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.

    • update: boolean

    Returns Euler

  • Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.

    Parameters

    • q: Quaternion

      a normalized quaternion.

    • order: string

      (optional) a string representing the order that the rotations are applied.

    • update: boolean

    Returns Euler

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

    Parameters

    • v: Vector3
    • order: string

      (optional) a string representing the order that the rotations are applied.

    Returns Euler

  • 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

    Returns Euler

    this discards revolution information.

  • Checks for strict equality of this euler and euler.

    Parameters

    Returns boolean

  • Array of length 3 or 4. The optional 4th argument corresponds from the order. Assigns this euler's x angle from array[0]. Assigns this euler's y angle from array[1]. Assigns this euler's z angle from array[2]. Optionally assigns this euler's order from array[3].

    Parameters

    • array: ArrayLike<number>

    Returns Euler

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

    Parameters

    • array: number[]

      (optional) array to store the euler in.

    • offset: number

      (optional) offset in the array.

    Returns number[]

  • Parameters

    • optionalResult: Vector3

      (optional) If specified, the result will be copied into this Vector, otherwise a new one will be created. Returns the Euler's x, y and z properties as a Vector3.

    Returns Vector3

  • A method to call onChangeCallback.

    Parameters

    • callback: Function

    Returns void