Математика |
A transform is a data object describing a model’s position, orientation, and
scale in the 3D world. Transform methods can be used to move a given vector,
light, camera, or model from its current location to a new position and/or
orientation.
Use the transform()
method to create a new
transform
data object:
Method |
Description |
Returns |
---|---|---|
|
Creates a new transform initialized as the identity transform. The identity
transform has no rotation and a vector position of |
A new transform object |
|
Use these properties to work with transforms:
Property |
Access |
Description |
Default |
---|---|---|---|
|
Get and set |
Script vector object describing the position of a transform with the value
|
|
|
Get and set |
Script vector object describing the x, y, and z scale of the transform with
the vector value Scaling is always applied model-relative. |
|
|
Get and set |
Script vector object describing the This value can vary because of the permissible types of transform operation.
For example, The |
|
|
Get and set |
A list including a vector and a floating-point value that describes this transform’s rotation as an axis/angle pair. The vector represents the direction, and the angle represents the rotation around the vector. |
|
|
Get and set |
A vector representing the transform’s canonical x axis in transform space. Example:
Canonical means reduced to the simplest possible mathematical expression. |
|
|
Get and set |
A vector representing the transform’s canonical y axis in transform space. Example:
|
|
|
Get and set |
A vector representing the transform’s canonical z axis in transform space. Example:
|
|
|
|
Use these methods to work with transforms:
Method |
Description |
Returns |
---|---|---|
|
Applies a rotation transformation after the current transformation:
After this series of transformations, performed in this order, the model’s
local origin will be at |
Nothing |
|
Applies a rotation transformation before the current transformation:
After this series of transformations, performed in this order, the model’s
local origin will be at |
Nothing |
|
Similar to
After this series of transformations, performed in this order, the model’s
local origin will be at |
Nothing |
|
Similar to
After this series of transformations, performed in this order, the model’s
local origin will be at |
Nothing |
|
Translates the position of the transform relative to the transform’s current orientation:
After this series of transformations, performed in this order, the model’s
local origin will be at |
Nothing |
|
Translates the position of the transform before the current transformation:
After this series of transformations, performed in this order, the model’s
local origin will be at |
Nothing |
|
Alters the original transform by applying the positional/rotational/scaling
effects of If |
Nothing |
|
Alters the original transform by preapplying the
positional/rotational/scaling effects of If |
Nothing |
|
Returns a new transform by interpolating from the original transform to
|
A new transform object |
|
Modifies the existing transform by |
Nothing |
|
Returns a new transform that is a copy of the original transform. |
A new transform object |
|
Resets the transform to an identity transform: position: rotation: scale: |
Nothing |
|
Turns the transform into the inverse of its previous position and rotation. If you multiply a vector by a transform, the rotational and positional changes described by the transform are applied to the vector. Inverting the transform and multiplying the vector again restores the vector to its original. |
Nothing |
|
Same as |
A new transform object |
|
Use the asterisk (*) to multiply two transforms:
Operator |
Description |
Returns |
---|---|---|
|
Returns a new transform that is the product of the two original transforms. Useful for combining the effects of two transforms. |
A new transform object |
|