|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Controller
public abstract class Controller
Controller
provides a base class for creation of controllers
to modify nodes and render states over time. The base controller provides a
repeat type, min and max time, as well as speed. Subclasses of this will
provide the update method that takes the time between the last call and the
current one and modifies an object in a application specific way.
Field Summary | |
---|---|
static int |
RT_CLAMP
A clamped repeat type signals that the controller should look like its final state when it's done Example: 0 1 5 8 9 10 10 10 10 10 10 10 10 10 10 10... |
static int |
RT_CYCLE
A cycled repeat type signals that the controller should cycle it's states forwards and backwards Example: 0 1 5 8 9 10 9 8 5 1 0 1 5 8 9 10 9 .... |
static int |
RT_WRAP
A wrapped repeat type signals that the controller should start back at the begining when it's final state is reached Example: 0 1 5 8 9 10 0 1 5 8 9 10 0 1 5 .... |
Constructor Summary | |
---|---|
Controller()
|
Method Summary | |
---|---|
java.lang.Class |
getClassTag()
|
void |
getControllerValues(java.util.HashMap<java.lang.String,java.lang.Object> store)
|
float |
getMaxTime()
Returns the current maximum time for this controller. |
float |
getMinTime()
Returns the current minimum time of this controller |
int |
getRepeatType()
Returns the current repeat type of this controller. |
float |
getSpeed()
Returns the speed of this controller. |
boolean |
isActive()
Returns if this Controller is active or not. |
void |
read(JMEImporter e)
|
void |
setActive(boolean active)
Sets the active flag of this controller. |
void |
setControllerValues(java.util.HashMap<java.lang.String,java.lang.Object> values)
|
void |
setMaxTime(float maxTime)
Sets the maximum time for this controller |
void |
setMinTime(float minTime)
Sets the minimum time of this controller |
void |
setRepeatType(int repeatType)
Sets the repeat type of this controller. |
void |
setSpeed(float speed)
Sets the speed of this controller |
abstract void |
update(float time)
Defined by extending classes, update is a signal to
Controller that it should update whatever object(s) it is controlling. |
void |
write(JMEExporter e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RT_CLAMP
public static final int RT_WRAP
public static final int RT_CYCLE
Constructor Detail |
---|
public Controller()
Method Detail |
---|
public float getSpeed()
public void setSpeed(float speed)
speed
- The new speedpublic float getMaxTime()
public void setMaxTime(float maxTime)
maxTime
- The new maximum timepublic float getMinTime()
public void setMinTime(float minTime)
minTime
- The new minimum time.public int getRepeatType()
public void setRepeatType(int repeatType)
repeatType
- The new repeat type.public void setActive(boolean active)
active
- The new active state.public boolean isActive()
public abstract void update(float time)
update
is a signal to
Controller that it should update whatever object(s) it is controlling.
time
- The time in seconds between the last call to update and the
current onepublic void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
java.io.IOException
public java.lang.Class getClassTag()
getClassTag
in interface Savable
public void getControllerValues(java.util.HashMap<java.lang.String,java.lang.Object> store)
public void setControllerValues(java.util.HashMap<java.lang.String,java.lang.Object> values)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |