Chapter 20
528
Transform commands
Use these commands to work with transforms:
y axis
Get and set
A vector representing the transform’s
canonical y axis in transform space. Example:
transform.identity()
transform.rotate(90,0,0)
put transform.yaxis
--vector(0,0,1)
vector
(0,1,0)
z axis
Get and set
A vector representing the transform’s
canonical z axis in transform space. Example:
transform.identity()
transform.rotate(0,90,0)
put transform.zaxis
--vector(1,0,0)
vector
(0,0,1)
Command
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
Property
Access
Description
Default
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...