Mat4Signal

The Mat4Signal class monitors a scene transform.

Properties

PropertyDescription

forward

(get) forward: Vec3Signal
(set) (Not Available)


position

(get) position: PointSignal
(set) (Not Available)


Represents the offset in the local coordinate system.

right

(get) right: Vec3Signal
(set) (Not Available)


rotation

(get) rotation: QuaternionSignal
(set) (Not Available)


Represents rotation along the X, Y and Z axis of the local coordinate system.
Note: The order of operations (rotations in particular) is the same as in Transform. The rotations are applied to the object in Z-Y-X order. The Z rotation is applied last to the object, therefore if the rotationX or rotationY is not zero, then rotationZ is applied not in the object's local coordinate system but in the rotated one.

rotationX

(get) rotationX: ScalarSignal
(set) (Not Available)


Represents rotation about the X-axis of the local coordinate system, in radians. The signal value is in the range [-PI, PI].
Note: The order of operations (rotations in particular) is the same as in Transform. The rotations are applied to the object in Z-Y-X order. The X rotation is applied first to the object, therefore it is always performed in the object's local coordinate system.

rotationY

(get) rotationY: ScalarSignal
(set) (Not Available)


Represents rotation about the Y-axis of the rotated local coordinate system, in radians. The signal value is in the range [-PI/2, PI/2].
Note: The order of operations (rotations in particular) is the same as in Transform. The rotations are applied to the object in Z-Y-X order. The Y rotation is applied second to the object, therefore if the rotationX is not zero, then rotationY is applied not in the object's local coordinate system but in the rotated one.

rotationZ

(get) rotationZ: ScalarSignal
(set) (Not Available)


Represents rotation about the Z-axis of the rotated local coordinate system, in radians. The signal value is in the range [-PI, PI].
Note: The order of operations (rotations in particular) is the same as in Transform. The rotations are applied to the object in Z-Y-X order. The Z rotation is applied last to the object, therefore if the rotationX or rotationY is not zero, then rotationZ is applied not in the object's local coordinate system but in the rotated one.

scale

(get) scale: PointSignal
(set) (Not Available)


Represents scale in the local coordinate system.

scaleX

(get) scaleX: ScalarSignal
(set) (Not Available)


Represents scale along the X-axis of the local coordinate system.

scaleY

(get) scaleY: ScalarSignal
(set) (Not Available)


Represents scale along the Y-axis of the local coordinate system.

scaleZ

(get) scaleZ: ScalarSignal
(set) (Not Available)


Represents scale along the z-axis of the local coordinate system.

up

(get) up: Vec3Signal
(set) (Not Available)


x

(get) x: ScalarSignal
(set) (Not Available)


Represents the offset along the X-axis of the local coordinate system.

y

(get) y: ScalarSignal
(set) (Not Available)


Represents the offset along the Y-axis of the local coordinate system.

z

(get) z: ScalarSignal
(set) (Not Available)


Represents the offset along the Z-axis of the local coordinate system.

Methods

MethodDescription

applyTo

applyTo(transform: Mat4Signal): Mat4Signal


Returns a signal with the value that is equal to the value of the provided transformation with the transformation of the current Mat4Signal applied to it.

  • transform - the transform to apply the current transform to, as a Mat4Signal.


applyToPoint

applyToPoint(signal: PointSignal): PointSignal


Returns a signal with the value that is equal to the value of the provided point with the transformation applied to it.
This performs a matrix multiplication of the provided point (with an implicit 1 in the 4th dimension) and the receiver transform, and divides by perspective.


  • signal - the point to apply the transform to, as a PointSignal.


applyToVector

applyToVector(signal: Vec3Signal): Vec3Signal


Returns a signal with the value that is equal to the value of the provided vector with the transformation applied to it.
This performs a matrix multiplication of the provided vector (with an implicit 0 in the 4th dimension) and the receiver transform, without change of position.


  • signal - the vector to apply the transform to, as a Vec3Signal.


delayBy

delayBy(timeSpan: {milliseconds: number}): Mat4Signal


Delays a signal. The argument is an object with a "milliseconds" property specifying the delay duration in milliseconds.

expSmooth

expSmooth(dampFactor: number): Mat4Signal


Smoothes a variable signal using exponential averaging over time.
Note: The smoothed transformation for a signal that specifies a rigid body transformation is guaranteed to be a rigid body transformation. The rotation component is smoothed in spherical coordinates using Slerp (spherical linear interpolation).

Note: See also ReactiveModule.expSmooth.


  • dampFactor - the dampening time constant, in milliseconds.


history

history(framesCount: number): SignalHistory<Transform>


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.


  • framesCount - the number of frames to track.


inverse

inverse(): Mat4Signal


Returns a signal with the value that is equal to the inverted transformation value of the given signal at any point of time.

lookAt

lookAt(targetPosition: PointSignal, selfUp?: Vec3Signal): Mat4Signal


Creates a scene object transform with rotation in direction of target.
Note: self needs to be pointing the scene object alongside the X axis.


  • targetPosition - The position of the target, as a PointSignal.
  • selfUp - The up direction vector, as a Vec3Signal. If no value is specified, a vector of [0, 1, 0] is used by default.


pinLastValue

pinLastValue(): Mat4Signal


Returns a new Mat4Signal containing a constant value which is the last value of the specified signal before pinLastValue is called.

transpose

transpose(): Mat4Signal


Returns a signal with the value that is equal to the transpose value of the given transformation signal at any point of time.