3D Lingo Dictionary > O-S > preMultiply |
![]() ![]() ![]() |
preMultiply
Syntax
transform1
.preMultiply(transform2
)
Description
3D transform command; alters transform1
by pre-applying the positional, rotational, and scaling effects of transform2
.
If transform2
describes a rotation of 90° about the X axis and transform1
describes a translation of 100 units in the Y axis, transform1.multiply(
transform2
)
will alter this transform so that it describes a translation followed by a rotation. The statement transform1.preMultiply(
transform2
)
will alter this transform so that it describes a rotation followed by a translation. The effect is that the order of operations is reversed.
Example
This statement performs a calculation that applies the transform of the model Mars to the transform of the model Pluto:
member("scene").model("Pluto").transform.preMultiply(member("scene").model("Mars").transform)
![]() ![]() ![]() |