
Models
347
Node types
A model is one of four types of objects that share the same transform, parent, and child
properties. The others are cameras, lights, and groups. Models, cameras, lights, and groups are
generically referred to as
node types
or
nodes.
Nodes can be each other’s parents or children, so long
as any one node has exactly one parent. A node can have any number of children. A model, for
example, can be the child of a light and the parent of a group.
Model properties
The properties of a model determine its particular appearance and relationship to the rest of the
3D world.
Property
Access
Description
Value
name
Get
Unique string name.
Any string.
parent
Get and set
This model’s parent; either another object or
the 3D cast member itself.
An object or
cast member.
child.count
Get
Number of children (but not grandchildren) of
a given model.
An integer.
transform
Get and set
Transform object representing this model’s
position and orientation relative to its
parent’s position and orientation:
transform.position
gives the relative
position.
transform.rotation
gives the relative
rotation.
Set: a transform
object.
Get: reference
to a transform
object.
userData
Get and set
A property list containing all properties
assigned to the model. Users can
add, remove, get, and set properties on this
list.
The default list
includes the
properties
assigned in the
3D modeling
tool. Additional
properties may
also be added.
resource
Get and set
Model resource object defining
model’s geometry.
Model resource
object.
shaderList
Get and set
List of all shaders used by the model. Setting
this property to a single shader sets every
element of the
shaderList
to that shader.
List.
shaderList.
count
Get
Number of shaders the model uses.
Positive integer.
shaderList.
[
index
]
Get and set
Provides access to a particular shader used
in a specific region of the model.
List.
shader
Get and set
Provides access to the first shader in the
shader list.
Shader object.
Содержание DIRECTOR MX 2004-USING DIRECTOR
Страница 1: ...DIRECTOR MX 2004 Using Director...
Страница 16: ...16 Chapter 1 Introduction...
Страница 82: ...82 Chapter 3 Sprites...
Страница 98: ...98 Chapter 4 Animation...
Страница 134: ...134 Chapter 5 Bitmaps...
Страница 242: ...242 Chapter 10 Sound and Synchronization...
Страница 274: ...274 Chapter 11 Using Digital Video...
Страница 290: ...290 Chapter 12 Behaviors...
Страница 302: ...302 Chapter 13 Navigation and User Interaction...
Страница 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Страница 392: ...392 Chapter 16 Working with Models and Model Resources...
Страница 418: ...418 Chapter 18 Movies in a Window...
Страница 446: ...446 Chapter 22 Managing and Testing Director Projects...