ADOBE DIRECTOR 11.0
User Guide
386
Method
Description
Returns
rotate
(
xAngle,
yAngle, zAngle
)
Applies a rotation transformation after the current transformation:
model.transform.identity()
model.transform.translate(100,0,0)
model.transform.rotate(0,0,90)
After this series of transformations, performed in this order, the model’s
local origin will be at
(0,100,0)
, assuming the model’s parent is the world.
Nothing
preRotate
(
xAngle,
yAngle, zAngle
)
Applies a rotation transformation before the current transformation:
model.transform.identity()
model.transform.translate(100,0,0)
model.transform.preRotate(0,0,90)
After this series of transformations, performed in this order, the model’s
local origin will be at
(100,0,0)
, assuming the model’s parent is the world.
Nothing
rotate
(
point,
vector, angle
)
Similar to
transform.rotate(
xAngle, yAngle, zAngle
)
, except
that the arguments are two vectors specifying an axis of rotation as a point
and a vector, plus an angle specifying the clockwise rotation around that
axis:
model.transform.identity()
model.transform.translate(-50,0,0)
model.transform.rotate(vector(100,0,0) vector(0,1,0))
After this series of transformations, performed in this order, the model’s
local origin will be at
(250,0,0)
, assuming the model’s parent is the world.
Nothing
preRotate
(
point,
vector, angle
)
Similar to
transform.preRotate(
xAngle, yAngle, zAngle
)
,
except that the arguments are two vectors specifying an axis of rotation as
a point and a vector, plus an angle specifying the clockwise rotation around
that axis:
model.transform.identity()
model.transform.translate(-50,0,0)
model.transform.preRotate(vector(100,0,0)
vector(0,1,0))
After this series of transformations, performed in this order, the model’s
local origin will be at
(150,0,0)
, assuming the model’s parent is the world.
Nothing
translate
(
xIncrement,
yIncrement,
zIncrement
)
Translates the position of the transform relative to the transform’s current
orientation:
model.transform.identity()
model.transform.rotate(0,90,0)
model.transform.translate(100,0,0)
After this series of transformations, performed in this order, the model’s
local origin will be at
(100,0,0)
, assuming the model’s parent is the world.
Nothing
preTranslate
(
xIncrement,
yIncrement,
zIncrement
)
Translates the position of the transform before the current transformation:
model.transform.identity()
model.transform.rotate(0,90,0)
model.transform.translate(100,0,0)
After this series of transformations, performed in this order, the model’s
local origin will be at
(0,0,100)
, assuming the model’s parent is the world.
Nothing
multiply
(
transform2
)
Alters the original transform by applying the positional/rotational/scaling
effects of
transform2
to the original transform.
If
transform2
describes a rotation of 90° around the x-axis and this trans-
form describes a translation of 100 units in the y-axis,
transform.multiply(
transform2
)
alters this transform so that it
describes a translation followed by a rotation.
Nothing