Chapter 19
484
Model commands
Use these commands to work with models:
visibility
Get and set
The way in which the sides of the model’s resource
are drawn. The choices are as follows:
#none
, in which no polygons are drawn and the
model is invisible.
#front
, in which only polygons on the outer
surface of the model are drawn, so that, if the
camera were inside the model, the model wouldn’t
be seen. Also known as “back face culling,” this
option optimizes performance.
#back
, in which only polygons on the inside of the
object are drawn, so that if the camera were outside
the model, the model wouldn’t be seen.
#both
, in which all polygons are drawn and the
model is visible regardless of orientation. This may
solve drawing problems, but it can also affect
performance because twice as many polygons
must be drawn.
The default is
#front
.
#none:
#front
#back
#both
debug
Get and set
Value indicating whether debug information is
drawn for this model. If the value is
TRUE (1)
,
lines from the x, y, and z axes are drawn sprouting
up from the model to indicate its orientation, and a
bounding sphere is drawn around the model.
TRUE (1)
or
FALSE (0)
. The
default is
FALSE
(0)
.
bounding
Sphere
Get
A list containing a vector and a floating-point value.
The vector represents the position of the model in
world space, and the floating-point value
represents the radius of the bounding sphere that
contains the model and its children.
bounding
Sphere
world
Position
Get
Position of the model in world coordinates. A quick
shortcut for
model.getWorldTransform().
position
.
world
Position
pointAt
Orientation
Get and set
A list of two orthogonal vectors,
[
objectRelativeDirecton,
objectRelativeUp
], that control how the
model’s
pointAt()
method works.
pointAt
Orientation
Command
Description
Returns
addChild(
aNode,
preserveWorld
)
Adds
aNode
to this model’s list of children. An equivalent
operation is to set
aNode.parent
to equal
this
model
.
The
preserveWorld
argument is optional. It can have
two values:
#preserveWorld
or
#preserveParent
.
If the value is
#preserveWorld
, the default, the world
transform of the child being added remains intact. If the
value is
#preserveParent
, the child’s
existing transform is interpreted as parent-relative.
Nothing
child[
index
]
Returns the child at the specified position in the index.
Node object
child(
name
)
Returns the child named
name
.
Node object
Property
Access
Description
Value
Содержание 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...