transform (property) 1057
For bones within models using the
bonesPlayer
modifier, this property defaults in value to the
transform assigned to the bone upon creation of the model file. The transform of a bone
represents the bone’s rotation relative to its parent bone and its position relative to its original
joint position. The original joint position is determine upon creation of the model file.
You can use the following transform commands and properties with the
transform
property of
node objects:
Note:
This section only contains summaries, see the individual entries for more detailed information.
•
preScale
applies scaling before the current positional, rotational, and scale offsets held by
the transform.
•
preTranslate
applies a translation before the current positional, rotational, and scale offsets
held by the transform.
•
preRotate
applies a rotation before the current positional, rotational, and scale offsets held by
the transform.
•
scale
(command) applies scaling after the current positional, rotational, and scale offsets held
by the transform.
•
scale
(transform) allows you to get or set the degree of scaling of the transform.
•
translate
applies a translation after the current positional, rotational, and scale offsets held
by the transform.
•
rotate
applies a rotation after the current positional, rotational, and scale offsets held by
the transform.
•
position
(transform) allows you to get or set the positional offset of the transform.
•
rotation
(transform) allows you to get or set the rotational offset of the transform.
If you want to modify the
transform
property of a bone within a model, then you must store a
copy of the original transform of the bone, modify the stored copy using the above commands
and properties, then reset the bone’s
transform
property so that it is equal to the modified
transform. For example:
t = member(“character”).model(“biped”).bonesPlayer.bone[38].\
transform.duplicate()
t.translate(25,0,-3)
member(“character”).model(“biped”).bonesPlayer.bone[38].\
transform = t
Parameters
None.
Example
This Lingo shows the transform of the model box, followed by the position and rotation
properties of the transform:
put member("3d world").model("box").transform
-- transform(1.000000,0.000000,0.000000,0.000000, \
0.000000,1.000000,0.000000,0.000000, \
0.000000,0.000000,1.000000,0.000000, -\
94.144844,119.012825,0.000000,1.000000)
put member("3d world").model("box").transform.position
-- vector(-94.1448, 119.0128, 0.0000)
put member("3d world").model("box").transform.rotation
--vector(0.0000, 0.0000, 0.0000)
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...