User Guide

350 Chapter 16: Working with Models and Model Resources
isInWorld() Returns a Boolean value indicating if the model is
currently in the world (TRUE) or not (FALSE). This
is useful for detecting if a given node's parent-
heirarchy tree terminates with the world group
object or not.
TRUE (1) or
FALSE (0)
registerScript
(eventName,
handlerName,
scriptInstance)
Registers a handler named handlerName that
is called in the
scriptInstance when the member
method
sendEvent() is called with eventName as an
argument.
If
scriptInstance is 0, a movie script
handler is called.
The user defines what
eventName is. The
eventName specified can be one of a default set of
events or a user defined custom event. The default
events are #collideAny, #collideWith,
#animationStarted, #animationEnded, #timeMS.
Nothing
addModifier
(symbol)
Adds the modifier symbol. TRUE (1) if symbol is a
valid modifier
FALSE (0) if symbol is
not a valid modifier
removeModifier
(symbol)
Removes the first modifier identified by symbol. TRUE (1) if symbol is a
valid modifier and
attached to the model
FALSE (0) if symbol is
not a valid modifier or
is not attached to
the model
update() Updates animation timing without rerendering.
Used to force update of bone positions in an
animation while inside a script call.
TRUE (1) or
FALSE (0)
translate
(direction
Vector, relativeTo)
Moves the model directionVector.length() in
the direction of the vector
directionVector.
The
relativeTo argument is optional and
defaults to
#self.
Nothing
translate
(x,y,z,
relativeTo)
Moves the model distance
x along the x-axis,
distance y along the y-axis, and distance z along
the z-axis. The
relativeTo argument is optional
and defaults to
#self.
This method can also be written as
translate(vector(x,y,z) relativeTo).
Nothing
rotate(x,y,z,
relativeTo)
Rotates the model by x° around the x-axis, y°
around the y-axis, and z
° around the z-axis.
The
relativeTo argument is optional and defaults
to
#self. If included, it defines the coordinate
space of the axes.
This method can also be written as
rotate(vector(x,y,z) relativeTo).
Nothing
Method Description Returns