Scripting API
ReactiveModule
QuaternionSignal

QuaternionSignal

The QuaternionSignal class monitors rotation in a quaternion representation.

Properties

PropertyDescription
eulerAngles
(get) eulerAngles: PointSignal
(set) (Not Available)


Represents the Euler angle from the QuaternionSignal, representing pitch, yaw, roll respectively.
Note: the order of rotations for the Euler angles is the same as in Transform class.
w
(get) w: ScalarSignal
(set) (Not Available)


Represents the W component of the quaternion.
x
(get) x: ScalarSignal
(set) (Not Available)


Represents the X component of the quaternion.
y
(get) y: ScalarSignal
(set) (Not Available)


Represents the Y component of the quaternion.
z
(get) z: ScalarSignal
(set) (Not Available)


Represents the Z component of the quaternion.

Methods

MethodDescription
angleAxis
angleAxis(): Vec4Signal


Returns the angle/axis representation of this quaternion. First element in the vector is angle in radians, with last 3 being X, Y, Z axis respectively.
angleTo
angleTo(signal: QuaternionSignal): ScalarSignal


Returns a signal with the value that is the angular distance between this quaternion and the provided quaternion, in radians.
* signal - the other signal to calculate the angular distance between, as a QuaternionSignal.
conjugate
conjugate(): QuaternionSignal


Returns the rotational conjugate of this quaternion. The conjugate of a quaternion represents the same rotation in the opposite direction about the rotational axis.
dot
dot(signal: QuaternionSignal): ScalarSignal


Returns a scalar signal with the value that is the dot product of the given signals.
* signal - the other to use in the dot product operation, as a QuaternionSignal.
history
history(framesCount: number, initialValues?: Array<Rotation>): SignalHistory<Rotation>


Returns an object used to access signal values from past frames.
Historical signal values are going to be initialized with signal value at call time or using initialValues if provided.

* framesCount - the number of frames to track.
* initialValues - an optional initial value to assign to the signal.
invert
invert(): QuaternionSignal


Returns the rotational conjugate of this quaternion. The conjugate of a quaternion represents the same rotation in the opposite direction about the rotational axis.
mix
mix(signal: QuaternionSignal, factor: ScalarSignal | number): QuaternionSignal


Returns a signal with the value that is the linear interpolation between this and another signal by a given factor.
* signal - the other signal to interpolate between, as a QuaternionSignal.
* factor - the factor to interpolate by, as a ScalarSignal or number.
mul
mul(signal: QuaternionSignal): QuaternionSignal


Returns a signal with the value that is the product of the values of the given signals.
* signal - the other signal to use in the multiplication operation, as a QuaternionSignal.
pinLastValue
pinLastValue(): QuaternionSignal


Returns a new QuaternionSignal containing a constant value which is the last value of the specified signal before pinLastValue is called.
slerp
slerp(signal: QuaternionSignal, factor: ScalarSignal | number): QuaternionSignal


Returns a signal with the value that is the spherical linear interpolation between this and another signal by a given factor.
* signal - the other signal to interpolate between, as a QuaternionSignal.
* factor - the factor to interpolate by, as a ScalarSignal or number.