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 PropertyContainer

Constructor Index

 o Actor(String, NYUSplashScreen)
The Actor constructor
 o Actor(String, VRMLManager)

Method Index

 o addChannel(Channel)
Adds a Channel to the actor
 o addLayer(Layer)
Adds a Layer to an Actor
 o addLayer(String)
Adds a Layer to an Actor
 o addLayer(String, float, int)
Adds a Layer to an Actor
 o addProperty(ImprovProperty)
Adds a property to the Actor
 o channelExists(String)
Tests to see if a given channel exists.
 o deleteLayer(int)
Delete a Layer given its position in the Layer order
 o deleteLayer(String)
Delete a Layer given its name
 o doFrame()
Do one cycle of behavior
 o getBehavior(String)
 o getChannel(int)
get Channel by its position in the Channel list
 o getChannel(String)
get Channel by name
 o getChannelName(int)
Get Channel name by its position in the Channel list
 o getLayer(int)
 o getLayer(String)
 o getLayers()
 o getName()
 o getNumberOfChannels()
 o getNumberOfLayers()
 o getProperty(String)
Gets an actor property given the property name
 o hasChannel(String)
 o hasLayer(String)
 o hasPanel()
 o hasProperty(String)
 o insertLayer(Layer, int)
Insert a Layer at the specified position in the Layer order.
 o insertLayer(String, int)
Insert a Layer at the specified position in the Layer order.
 o renameLayer(Layer, String)
Rename a Layer given the Layer and the new name
 o renameLayer(String, String)
Rename a Layer given its current name and the new name
 o setBehavior(Behavior)
Activate a Behavior
 o 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
 o setBehavior(String, double)
Activate a behavior given its name, and temporarily set its duration.
 o 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.
 o 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.
 o setProperty(String, float)

Constructors

 o Actor
 public Actor(String n,
              NYUSplashScreen splash)
The Actor constructor

 o Actor
 public Actor(String n,
              VRMLManager m)

Methods

 o addChannel
 public void addChannel(Channel channel)
Adds a Channel to the actor

 o channelExists
 public boolean channelExists(String channelName)
Tests to see if a given channel exists.

Returns:
true if the channel exists, otherwise false.
 o 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.
 o 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.
 o addLayer
 public Layer addLayer(Layer layer)
Adds a Layer to an Actor

Returns:
the Layer object.
 o 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
 o insertLayer
 public Layer 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
 o 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.
 o deleteLayer
 public void deleteLayer(String layerName)
Delete a Layer given its name

Parameters:
layerName - the name of the Layer to be deleted.
 o 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
 o 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
 o 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
 o 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
 o getChannel
 public Channel getChannel(String channelName)
get Channel by name

Parameters:
channelName - the name of the channel
Returns:
the channel
 o getNumberOfChannels
 public int getNumberOfChannels()
Returns:
the number of channels in the channel list of this Actor
 o doFrame
 public void doFrame()
Do one cycle of behavior

 o 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.
 o setBehavior
 public void setBehavior(Behavior behavior)
Activate a Behavior

Parameters:
behaviorName - the name of the State or Sequence to be activated.
 o 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.
 o 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
 o 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
 o hasProperty
 public boolean hasProperty(String propertyName)
 o setProperty
 public void setProperty(String property,
                         float value)
 o 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
 o hasPanel
 public boolean hasPanel()
Returns:
the value set with the setHasPanel method
 o 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.
 o 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.
 o getName
 public String getName()
Returns:
the Actor's name.
 o getLayers
 public Layer[] getLayers()
Returns:
the Layers array.
 o 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.
 o 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.
 o getNumberOfLayers
 public int getNumberOfLayers()
Returns:
the number of Layers
 o addProperty
 public void addProperty(ImprovProperty property)
Adds a property to the Actor

Parameters:
property - the property to be added.
 o getProperty
 public ImprovProperty getProperty(String propertyName)
Gets an actor property given the property name

Parameters:
propertyName - the name of the property
Returns:
the property, if it exists, otherwise null.

All Packages  Class Hierarchy  This Package  Previous  Next  Index