Controlling the 3D World
529
translate
(
xIncrement,yIncre
ment,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
transform 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
preMultiply
(
transform2
)
Alters the original transform by preapplying the positional/rotational/
scaling effects of
transform2
to the original transform.
If
transform2
describes a rotation of 90° around the x axis and this
transform describes a translation of 100 units in the y axis,
transform.preMultiply(
transform2
)
alters this transform so
that it describes a rotation followed by a translation.
Nothing
interpolate
(oTransform2,
fPercentage)
Returns a new transform by interpolating from the original transform to
transform2
by
fPercentage
. The value of
fPercentage
should
be between 0 and 100.
A new transform
object
interpolateTo
(oTransform2,
fPercentage)
Modifies the existing transform by
fPercentage
. The value of
fPercentage
should be between 0 and 100.
Nothing
duplicate()
Returns a new transform that is a copy of the original transform.
A new transform
object
identity
Resets the transform to an identity transform:
position:
—0,0,0
rotation:
0,00
scale:
1,1,1
Nothing
invert()
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
inverse()
Same as
invert()
except that the original transform is unaffected.
A new transform
object
Command
Description
Returns
Содержание 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...