hmi.physics.controller
Class ScriptController
java.lang.Object
hmi.physics.controller.ScriptController
- All Implemented Interfaces:
- PhysicalController
- Direct Known Subclasses:
- ScriptHumanoidController, ScriptJointController
public abstract class ScriptController
- extends Object
- implements PhysicalController
|
Method Summary |
String |
getScript()
|
void |
reset()
Clears out all previous time dependen variables |
void |
setScript(String s)
Sets the script to be executed
Scripts in Rhino. |
void |
update(double timeDiff)
Updates the controller |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invEngine
private Invocable invEngine
jsEngine
protected ScriptEngine jsEngine
script
private String script
ScriptController
public ScriptController()
reset
public void reset()
- Description copied from interface:
PhysicalController
- Clears out all previous time dependen variables
- Specified by:
reset in interface PhysicalController
update
public void update(double timeDiff)
- Description copied from interface:
PhysicalController
- Updates the controller
- Specified by:
update in interface PhysicalController
- Parameters:
timeDiff - time since last update
setScript
public void setScript(String s)
throws ScriptException
- Sets the script to be executed
Scripts in Rhino. The update(timediff) function is called every frame
- Parameters:
s - script string
- Throws:
ScriptException - exception if invalid script
getScript
public String getScript()