hmi.physics.controller
Class ScriptController

java.lang.Object
  extended by hmi.physics.controller.ScriptController
All Implemented Interfaces:
PhysicalController
Direct Known Subclasses:
ScriptHumanoidController, ScriptJointController

public abstract class ScriptController
extends Object
implements PhysicalController


Field Summary
private  Invocable invEngine
           
protected  ScriptEngine jsEngine
           
private  String script
           
 
Constructor Summary
ScriptController()
           
 
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
 
Methods inherited from interface hmi.physics.controller.PhysicalController
copy, getDesiredJointIDs, getParameterValue, getRequiredJointIDs, setParameterValue, setParameterValue, setPhysicalHumanoid
 

Field Detail

invEngine

private Invocable invEngine

jsEngine

protected ScriptEngine jsEngine

script

private String script
Constructor Detail

ScriptController

public ScriptController()
Method Detail

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()