Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObservableQuaternion

Represents a rotation quaternion in 3D space.

Hierarchy

  • ObservablePoint
    • ObservableQuaternion

Index

Constructors

constructor

  • new ObservableQuaternion(cb: () => void, scope: any, x?: number, y?: number, z?: number, w?: number): ObservableQuaternion
  • Creates a new observable quaternion.

    Parameters

    • cb: () => void

      The callback when changed.

        • (): void
        • Returns void

    • scope: any

      The owner of callback.

    • x: number = 0

      The x component.

    • y: number = 0

      The y component.

    • z: number = 0

      The z component.

    • w: number = 1

      The w component.

    Returns ObservableQuaternion

Properties

_x

_x: number

_y

_y: number

cb

cb: () => any

Type declaration

    • (): any
    • Returns any

scope

scope: any

Accessors

array

  • get array(): Float32Array
  • set array(value: Float32Array): void

w

  • get w(): number
  • set w(value: number): void

x

  • get x(): number
  • set x(value: number): void

y

  • get y(): number
  • set y(value: number): void

z

  • get z(): number
  • set z(value: number): void

Methods

clone

copyFrom

copyTo

  • copyTo<T>(p: T): T
  • Copies x, y, z and w into the given quaternion.

    Type parameters

    • T: IPoint<T>

    Parameters

    • p: T

      The quaternion to copy to.

    Returns T

equals

set

setEulerAngles

  • setEulerAngles(x: number, y: number, z: number): void

setFrom

toString

  • toString(): string
  • Returns string

Generated using TypeDoc