All Packages Class Hierarchy This Package Previous Next Index
Class improv.actor.Actor
java.lang.Object
|
+----improv.actor.Actor
- public final class Actor
- extends Object
- implements ChannelContainer
An Actor represents an animated entity in a world. Each actor manages
a list of layers, and also has a list of channels which are used to
route animation outputs to the world.
- See Also:
- Layer, Channel
-
Actor(String, NYUSplashScreen)
- The Actor constructor
-
Actor(String, VRMLManager)
-
-
addChannel(Channel)
- Adds a Channel to the actor
-
addLayer(Layer)
- Adds a Layer to an Actor
-
addLayer(String)
- Adds a Layer to an Actor
-
addLayer(String, float, int)
- Adds a Layer to an Actor
-
channelExists(String)
- Tests to see if a given channel exists.
-
deleteLayer(int)
- Delete a Layer given its position in the Layer order
-
deleteLayer(Layer)
- Delete a Layer object from the list of layers in this actor
-
deleteLayer(String)
- Delete a Layer given its name
-
doFrame()
- Do one cycle of behavior
-
doFrame(double)
-
-
getBehavior(String)
-
-
getChannel(int)
- get Channel by its position in the Channel list
-
getChannel(String)
- get Channel by name
-
getChannelName(int)
- Get Channel name by its position in the Channel list
-
getLayer(int)
-
-
getLayer(String)
-
-
getName()
-
-
getNumberOfChannels()
-
-
getNumberOfLayers()
-
-
hasChannel(String)
-
-
hasLayer(String)
-
-
hasPanel()
-
-
insertLayer(Layer, int)
- Insert a Layer at the specified position in the Layer order.
-
insertLayer(String, int)
- Insert a Layer at the specified position in the Layer order.
-
layerNameChanged(Layer, String, String)
-
-
renameLayer(Layer, String)
- Rename a Layer given the Layer and the new name
-
renameLayer(String, String)
- Rename a Layer given its current name and the new name
-
setBehavior(Behavior)
- Activate a Behavior
-
setBehavior(String)
- Activate a Behavior given its name.
Note: multiple Behaviors may share a name in which case each behavior with that name will be activated
-
setBehavior(String, double)
- Activate a behavior given its name, and temporarily set its duration.
-
setBehavior(String, double, boolean)
- Activate a behavior given its name, and temporarily set its duration, and momentary flag.
Next time the behavior is activated it will return to its default duration, and momentary flag.
-
setChannelValue(String, float)
-
-
setHasPanel(boolean)
- This method has no effect on the functionality of the actor, but may be used to determine whether an author-defined GUI control panel should be displayed.
Actor
public Actor(String n,
NYUSplashScreen splash)
- The Actor constructor
Actor
public Actor(String n,
VRMLManager m)
addChannel
public void addChannel(Channel channel)
- Adds a Channel to the actor
channelExists
public boolean channelExists(String channelName)
- Tests to see if a given channel exists.
- Returns:
- true if the channel exists, otherwise false.
addLayer
public void addLayer(Layer layer)
- Adds a Layer to an Actor
- Parameters:
- layer - - the layer to add
addLayer
public Layer addLayer(String layerName)
- Adds a Layer to an Actor
- Parameters:
- layerName - the name of the layer to be added.
- Returns:
- the layer added.
addLayer
public Layer addLayer(String layerName,
float opacity,
int composite)
- Adds a Layer to an Actor
- Parameters:
- layerName - the name of the layer to be added.
- opacity - the default opacity of the layer.
- composite - the default compocite mode of the layer.
- Returns:
- the layer added.
insertLayer
public Layer insertLayer(String layerName,
int position)
- Insert a Layer at the specified position in the Layer order.
- Parameters:
- layerName - the name of the Layer to be added
- position - the position in the layerlist to add the item
- Returns:
- the Layer object
insertLayer
public void insertLayer(Layer layer,
int position)
- Insert a Layer at the specified position in the Layer order.
- Parameters:
- layer - the Layer to be added
- position - the position in the layer order to add the item
- Returns:
- the Layer object
deleteLayer
public void deleteLayer(int position)
- Delete a Layer given its position in the Layer order
- Parameters:
- the - Layer's position in the layer order.
deleteLayer
public void deleteLayer(String layerName)
- Delete a Layer given its name
- Parameters:
- layerName - the name of the Layer to be deleted.
deleteLayer
public void deleteLayer(Layer layer)
- Delete a Layer object from the list of layers in this actor
- Parameters:
- layer - - the layer to remove
renameLayer
public void renameLayer(Layer layer,
String newName)
- Rename a Layer given the Layer and the new name
- Parameters:
- newName - the new name of the Layer
layerNameChanged
public void layerNameChanged(Layer layer,
String oldName,
String newName)
renameLayer
public void renameLayer(String oldName,
String newName)
- Rename a Layer given its current name and the new name
- Parameters:
- oldName - the old name of the Layer
- newName - the new name of the Layer
getChannelName
public String getChannelName(int position)
- Get Channel name by its position in the Channel list
- Parameters:
- position - the position in the channel list
- Returns:
- the name of the channel
getChannel
public Channel getChannel(int position)
- get Channel by its position in the Channel list
- Parameters:
- position - the position in the channel list
- Returns:
- the channel
getChannel
public Channel getChannel(String channelName)
- get Channel by name
- Parameters:
- channelName - the name of the channel
- Returns:
- the channel
getNumberOfChannels
public int getNumberOfChannels()
- Returns:
- the number of channels in the channel list of this Actor
doFrame
public void doFrame()
- Do one cycle of behavior
doFrame
public void doFrame(double time)
setBehavior
public void setBehavior(String behaviorName)
- Activate a Behavior given its name.
Note: multiple Behaviors may share a name in which case each behavior with that name will be activated
- Parameters:
- behaviorName - the name of the State or Sequence to be activated.
setBehavior
public void setBehavior(Behavior behavior)
- Activate a Behavior
- Parameters:
- behaviorName - the name of the State or Sequence to be activated.
setBehavior
public void setBehavior(String behaviorName,
double duration)
- Activate a behavior given its name, and temporarily set its duration.
Next time the behavior is activated it will return to its default duration.
- Parameters:
- behaviorName - the State or Sequence to be activated
- duration - the temporary duration of the State or Sequence.
setBehavior
public void setBehavior(String behaviorName,
double duration,
boolean momentary)
- Activate a behavior given its name, and temporarily set its duration, and momentary flag.
Next time the behavior is activated it will return to its default duration, and momentary flag.
- Parameters:
- behaviorName - the name of the behavior to be activated.
- duration - the temporary duration value of the behavior
- momentary - the temporary momentary value of the behavior
getBehavior
public Behavior getBehavior(String behaviorName)
- Returns:
- the first behavior with the given name. If the Actor has no behaviors by that name, return null
setChannelValue
public void setChannelValue(String channel,
float value)
setHasPanel
public void setHasPanel(boolean hasPanel)
- This method has no effect on the functionality of the actor, but may be used to determine whether an author-defined GUI control panel should be displayed.
- Parameters:
- hasPanel - sets whether or not a author-defined GUI panel should be displayed
hasPanel
public boolean hasPanel()
- Returns:
- the value set with the setHasPanel method
hasChannel
public boolean hasChannel(String channelName)
- Parameters:
- channelName - the name of the channel being tested for.
- Returns:
- true if the Actor has a Channel by the given name.
hasLayer
public boolean hasLayer(String layerName)
- Parameters:
- layerName - the name of the layer being tested for.
- Returns:
- true if the Actor has a Layer by the given name.
getName
public String getName()
- Returns:
- the Actor's name.
getLayer
public Layer getLayer(int layerNum)
- Parameters:
- layerNum - the position of the layer in the Layers array.
- Returns:
- the Layer at the specified position in the Layers Array.
getLayer
public Layer getLayer(String layerName)
- Parameters:
- layerName - the name of the Layer.
- Returns:
- the Layer with the specified name. If no such Layer exists, return null.
getNumberOfLayers
public int getNumberOfLayers()
- Returns:
- the number of Layers
All Packages Class Hierarchy This Package Previous Next Index