chain of transform components.
Query if transform has a specific component.
true if component name exists
Set a component at a speicific index of the transform definition.
index to set component
component definition
this transform
Add a transform component to the chain
component definition
this transform
Return a duplicate transform with an added translation component.
The translation can either be defined as:
Return a duplicate transform with an added rotation component.
(z)
(0)
(0)
Return a duplicate transform with an added direction transform component.
Return a duplicate transform with an added change of basis from the standard basis transform component.
Return a duplicate transform with an added change of basis transform component.
Return a duplicate transform with an added custom transform component.
Return a duplicate transform with an added scale transform component
Clip all rotation (2D, axis, x, y, z rotations) transform components
within this transform chain angles between 0º-360º, -180º-180º, or not at
all (null)
Only angle values are clipped. The axis values of the axis rotation is not changed.
Update the nth translation transform component with a new translation.
Return a linearly interpolated transform between this transform and
delta at some percent between the two.
For translation transform components, interpolation can either be
'linear' or 'curved'.
delta transform
percent to interpolate where 0 is this transform and 1 is delta transform
translation style for translation components only
translation options for translation components only
Retrieve the nth rotation transform component rotation value.
(0)
Retrieve the nth direction transform component.
(0)
Retrieve the nth custom transform component.
(0)
Retrieve the nth change of basis from standard basis transform component.
(0)
Retrieve the nth change of basis transform component.
(0)
Update the nth scale transform component with a new scale.
Update the nth rotation transform component.
Update the nth direction transform component.
Update the nth change of basis from the standard basis transform component.
Update the nth change of basis transform component.
Return the matrix that respresents the cascaded transform chain
Return the matrix that respresents the cascaded transform chain
round the matrix to some precision or
null for no rounding (null)
true if transformToCompare has the same order of transform components.
true if transformToCompare is equal to this transform within some
precision.
true if transformToCompare is wihtin some delta of this transform.
isEqualTo rounds the values to some precision to compare values. In
comparison this will directly compare the delta between values. This may
be more useful than rounding when values are close to rounding thresholds.
Subtract each corresponding transform component. Both transforms must have the same shape.
Subtract each corresponding transform component. Both transforms must have the same shape.
Multiply each corresponding transform component. Both transforms must have the same shape.
Cascade two transforms together such that this transform transforms the input transform. In other words, the transform components of the input transform will performed first before this transform.
Cascade two transforms together such that this transform is transformed by the input transform. In other words, the this transform's components of will performed first before the input transform transform.
Return a duplicate transform with all values rounded to some precision.
(8)
Transform
true if all transforms within the transform chain are below the
zeroThreshold
(0)
Return a duplicate transform.
Return a duplicate transform chain where all transform components are the same component type but with identity values.
A Transform is a chain or cascade of transform components, such as rotations and translations.
The transform components cascade to form a single 3D transform matrix in homogenous coordinates - meaning the result is a 4x4 matrix. This matrix can be used to transform a point in space.
There are several built in transform components:
Matrix multiplication is not commutative, and so chaining transforms is not commutative. This means the order of components is important.
For example, if a point (1, 0) is first translated by (1, 0) and then rotated by π / 2, then it will start at (1, 0), then move to (2, 0), then rotate to (0, 2).
In comparison if the same point is first rotated by π / 2 then translated by (1, 0) it will start at (1, 0), then rotate to (0, 1), then move to (1, 1).
In this Transform object, the order that components are defined, is the order the resulting transform will represent.
A transform can be created by either chaining transform component methods on an instantiated Transform object, or using an array definition of components. For example the following two transforms are the same:
See
See TypeParsableTransform for the different ways to define a transform.