All Packages Class Hierarchy This Package Previous Next Index
Class improv.actor.behavior.Layer
java.lang.Object
|
+----improv.actor.behavior.Layer
- public final class Layer
- extends Object
- implements Compositable
-
hasChannels
-
-
isHidden
-
-
Layer(String)
-
-
Layer(String, Actor)
-
-
Layer(String, Actor, float, int)
-
-
addBehavior(Behavior)
- Add a previously defined behavior to a layer
-
addSequence(String)
- Create a new Sequence with the default values and add it to the Layer
-
addSequence(String, double, Curve, boolean, double, boolean)
- Create a new Sequence and add it to the Layer
-
addState(String)
- Create a new State with the default values and add it to the Layer
-
addState(String, double, Curve, double, Curve, boolean, double, int, boolean)
- Create a State and add it to layer
-
deleteBehavior(Behavior)
-
-
deleteBehavior(int)
-
-
deleteBehavior(String)
-
-
doFrame(double)
-
-
finishLayer()
-
Called by the Actor class
-
getActiveBehavior()
- Returns the Behavior object representing the currently active behavior (state or sequence)
in this layer.
-
getActor()
-
-
getBehavior(int)
- Returns the Behavior (i.e.
-
getBehavior(String)
- Returns the Behavior object with the given name in this layer, or null if
no behavior with that name exists.
-
getComposite()
-
-
getName()
-
-
getNumberOfBehaviors()
- Returns the number of behaviors managed by this layer.
-
getOpacity()
-
-
getTimeChannel()
-
-
getTimeScale()
-
-
hasBehavior(String)
-
-
inheritComposite()
-
-
isHidden()
-
-
renameBehavior(Behavior, String)
- Changes the name of a behavior to the given string.
Deprecated.
-
setActiveBehavior(Behavior)
- Sets the active behavior in the layer to the given Behavior object.
-
setActiveBehavior(Behavior, double, boolean)
- Sets the active behavior in the layer to given behavior object.
-
setActiveBehavior(int)
- Sets the active behavior in the layer to the behavior at the given position.
-
setActiveBehavior(int, double, boolean)
- Sets the active behavior in the layer to the behavior at the given position.
-
setActiveBehavior(String)
- Sets the active behavior in the layer to the behavior with the given name
-
setActiveBehavior(String, double, boolean)
- Sets the active behavior in the layer to the behavior with the given name.
-
setActor(Actor)
-
-
setBackground(Behavior)
-
-
setBackground(String)
-
-
setComposite(int)
-
-
setComposite(String)
-
-
setHidden(boolean)
-
-
setName(String)
-
-
setOpacity(float)
-
-
startLayer()
-
Called by the Actor class
hasChannels
public boolean hasChannels
isHidden
public boolean isHidden
Layer
public Layer(String name,
Actor actor)
Layer
public Layer(String name)
Layer
public Layer(String name,
Actor actor,
float opacity,
int composite)
addBehavior
public void addBehavior(Behavior behavior)
- Add a previously defined behavior to a layer
addState
public State addState(String name,
double transitionTime,
Curve transitionCurve,
double timeScale,
Curve timeScaleCurve,
boolean localClock,
double duration,
int composite,
boolean momentary)
- Create a State and add it to layer
- Parameters:
- name - the name of the State
- transitionTime - the default transition time
- transitionCurve - the default transition curve
- timeScale - the time scale of the State. Used in synchronizing differently phased animations.
- timeScaleCurve - the time scale curve.
- localClock - if TRUE, clock is based on start time of the state, otherwise clock is based on the clock of the previous state.
- duration - the default duration of the State
- composite - the compositing behavior of this State, possible values are ADD, SUBTRACT, MULTIPLY, DIVIDE, MIN, MAX, and POW.
- momentary - if TRUE, the State active immediately preceding this State will be activated at the end of this states's duration, if FALSE, the default State for this layer will be activated.
- Returns:
- the added State
addState
public State addState(String name)
- Create a new State with the default values and add it to the Layer
- Parameters:
- name - the name of the State
- Returns:
- the added State
addSequence
public Sequence addSequence(String name,
double timeScale,
Curve timeScaleCurve,
boolean localClock,
double duration,
boolean momentary)
- Create a new Sequence and add it to the Layer
- Parameters:
- name - the name of the sequence
- timeScale - the time scale of the sequence
- timeScaleCurve - the time scale curve of the sequence
- localClock - if TRUE, the clock for this sequence is based on the start time of the Sequence, otherwise it is based on the clock of the immediately preceding Sequence.
- duration - the default duration of the Sequence.
- momentary - if TRUE, the State active immediately preceding this State will be activated at the end of this states's duration, if FALSE, the default State for this layer will be activated.
- Returns:
- the added Sequence
addSequence
public Sequence addSequence(String name)
- Create a new Sequence with the default values and add it to the Layer
- Returns:
- the added Sequence
hasBehavior
public boolean hasBehavior(String behaviorName)
- Returns:
- TRUE if the Layer contains the State or Sequence, otherwise FALSE.
setHidden
public void setHidden(boolean b)
isHidden
public boolean isHidden()
setName
public void setName(String name)
getName
public String getName()
getActor
public Actor getActor()
setActor
public void setActor(Actor actor)
startLayer
public void startLayer()
- Called by the Actor class
finishLayer
public void finishLayer()
- Called by the Actor class
deleteBehavior
public void deleteBehavior(int position)
deleteBehavior
public void deleteBehavior(String behaviorName)
deleteBehavior
public void deleteBehavior(Behavior behavior)
setBackground
public void setBackground(String behaviorName)
setBackground
public void setBackground(Behavior behavior)
renameBehavior
public void renameBehavior(Behavior b,
String s)
- Note: renameBehavior() is deprecated.
The Behavior.setName() method now does this automatically, so this
method is now obsolete.
- Changes the name of a behavior to the given string.
- See Also:
- setName
setActiveBehavior
public void setActiveBehavior(int i)
- Sets the active behavior in the layer to the behavior at the given position.
setActiveBehavior
public void setActiveBehavior(String s)
- Sets the active behavior in the layer to the behavior with the given name
setActiveBehavior
public void setActiveBehavior(Behavior b)
- Sets the active behavior in the layer to the given Behavior object.
setActiveBehavior
public void setActiveBehavior(int i,
double dur,
boolean mom)
- Sets the active behavior in the layer to the behavior at the given position.
- Parameters:
- dur - - for momentary behaviors, this is the duration for the behavior in seconds.
Use -1 to indicate that the behavior should run indefinately.
- mom - - if this is true, the behavior is activated momentarily, and -dur- indicates
the duration for the momentary behavior.
setActiveBehavior
public void setActiveBehavior(String s,
double dur,
boolean mom)
- Sets the active behavior in the layer to the behavior with the given name.
- Parameters:
- dur - - for momentary behaviors, this is the duration for the behavior in seconds.
Use -1 to indicate that the behavior should run indefinately.
- mom - - if this is true, the behavior is activated momentarily, and -dur- indicates
the duration for the momentary behavior.
setActiveBehavior
public void setActiveBehavior(Behavior behavior,
double dur,
boolean mom)
- Sets the active behavior in the layer to given behavior object.
- Parameters:
- dur - - for momentary behaviors, this is the duration for the behavior in seconds.
Use -1 to indicate that the behavior should run indefinately.
- mom - - if this is true, the behavior is activated momentarily, and -dur- indicates
the duration for the momentary behavior.
getActiveBehavior
public Behavior getActiveBehavior()
- Returns the Behavior object representing the currently active behavior (state or sequence)
in this layer.
getBehavior
public Behavior getBehavior(int i)
- Returns the Behavior (i.e. State or Sequence) object at the given index in the list
of behaviors of this Layer.
getBehavior
public Behavior getBehavior(String s)
- Returns the Behavior object with the given name in this layer, or null if
no behavior with that name exists.
getNumberOfBehaviors
public int getNumberOfBehaviors()
- Returns the number of behaviors managed by this layer.
getTimeChannel
public SFFloatChannel getTimeChannel()
getTimeScale
public float getTimeScale()
setOpacity
public void setOpacity(float f)
getOpacity
public float getOpacity()
doFrame
public void doFrame(double time)
setComposite
public void setComposite(int c)
setComposite
public void setComposite(String s)
getComposite
public int getComposite()
inheritComposite
public boolean inheritComposite()
All Packages Class Hierarchy This Package Previous Next Index