Working with Models and Model Resources
483
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
Lingo 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.
bounding
Sphere
Get
A list containing a vector and a floating-point value.
The vector represents the world position and the
value represents the radius of a bounding sphere
surrounding the model and all its children.
[vector
(0,0,0),
0.0]
world
Position
Get and set
Position of the model in world coordinates.
Shortcut for the command
node.getWorldTransform
()position
.
Vector object.
Содержание 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...