|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yobotics.simulationconstructionset.Simulation
public class Simulation
Constructor Summary | |
---|---|
Simulation(Robot[] robots,
int dataBufferSize)
|
|
Simulation(Robot robot,
int dataBufferSize)
|
Method Summary | |
---|---|
void |
addScript(Script script)
|
void |
addSimulateDoneListener(SimulationDoneListener listener)
|
void |
addVarList(VarList newVarList)
|
boolean |
checkSimulateDoneCriterion()
|
void |
closeAndDispose()
|
java.util.ArrayList<YoVariable> |
getAllVariables()
Returns all the YoVariables in this YoVariableHolder |
YoVariable[] |
getAllVariablesArray()
Returns all the YoVariables in this YoVariableHolder |
VarList |
getCombinedVarList()
|
DataBuffer |
getDataBuffer()
|
double |
getDT()
|
long |
getRecordFreq()
|
Robot[] |
getRobots()
|
Graphics3DAdapter |
getSimulationGraphics()
|
SimulationSynchronizer |
getSimulationSynchronizer()
|
YoVariable |
getVariable(java.lang.String varname)
Gets a YoVariable with the given name if it is in this YoVariableHolder, otherwise returns null. |
YoVariable |
getVariable(java.lang.String nameSpace,
java.lang.String varname)
Gets a YoVariable with the given nameSpace and name if it is in this YoVariableHolder, otherwise returns null. |
java.util.ArrayList<YoVariable> |
getVariables(NameSpace nameSpace)
Returns all the YoVariables with the given nameSpace that are in this YoVariableHolder, empty if there are none. |
java.util.ArrayList<YoVariable> |
getVariables(java.lang.String varname)
Returns all the YoVariables with the given name that are in this YoVariableHolder, empty if there are none. |
java.util.ArrayList<YoVariable> |
getVariables(java.lang.String nameSpace,
java.lang.String varname)
Returns all the YoVariables with the given nameSpace and name that are in this YoVariableHolder, empty if there are none. |
java.util.ArrayList<YoVariable> |
getVariablesThatContain(java.lang.String searchString,
boolean caseSensitive)
|
java.util.ArrayList<YoVariable> |
getVariablesThatStartWith(java.lang.String searchString)
|
java.util.ArrayList<YoVariable> |
getVars(java.lang.String[] varNames,
java.lang.String[] regularExpressions)
|
boolean |
hasUniqueVariable(java.lang.String varname)
Checks if this YoVariableHolder holds exactly one YoVariable with the given name. |
boolean |
hasUniqueVariable(java.lang.String nameSpace,
java.lang.String varname)
Checks if this YoVariableHolder holds exactly one YoVariable with the given nameSpace and name. |
void |
notifySimulateDoneListeners()
|
void |
notifySimulateDoneListenersOfException(java.lang.Throwable throwable)
|
void |
registerCollisionGroup(CollisionGroup group)
|
void |
registerCollisionGroups(java.util.ArrayList<CollisionGroup> groups)
|
void |
registerVariable(YoVariable variable)
|
void |
removeSimulateDoneListener(SimulationDoneListener listener)
|
void |
setDT(double simulateDT,
int recordFrequency)
|
void |
setRecordDT(double recordDT)
|
void |
setRobots(Robot[] robots)
|
void |
setSimulateDoneCriterion(SimulationDoneCriterion criterion)
|
void |
setupSimulationGraphics(java.util.ArrayList<GraphicsRobot> graphicsRobotsToUpdate)
|
void |
simulate(double simulationTime)
|
void |
simulate(int numTicks)
|
void |
tickAndUpdate()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Simulation(Robot robot, int dataBufferSize)
public Simulation(Robot[] robots, int dataBufferSize)
Method Detail |
---|
public double getDT()
public void setDT(double simulateDT, int recordFrequency)
public void setRecordDT(double recordDT)
public long getRecordFreq()
public void addScript(Script script)
public java.util.ArrayList<YoVariable> getAllVariables()
YoVariableHolder
getAllVariables
in interface YoVariableHolder
public YoVariable[] getAllVariablesArray()
YoVariableHolder
getAllVariablesArray
in interface YoVariableHolder
public YoVariable getVariable(java.lang.String varname)
YoVariableHolder
getVariable
in interface YoVariableHolder
varname
- String Name of YoVariable to get. If contains a ".", then YoVariable's nameSpace ending must match that of name.
public boolean hasUniqueVariable(java.lang.String varname)
YoVariableHolder
hasUniqueVariable
in interface YoVariableHolder
varname
- String Name of YoVariable to check for. If contains a ".", then YoVariable's nameSpace ending must match that of name.
public YoVariable getVariable(java.lang.String nameSpace, java.lang.String varname)
YoVariableHolder
getVariable
in interface YoVariableHolder
nameSpace
- String nameSpaceEnding ending of YoVariable to get. The YoVariable's nameSpace ending must match that of nameSpace.varname
- String Name of YoVariable to get. If contains a ".", then throws a RuntimeException.
public boolean hasUniqueVariable(java.lang.String nameSpace, java.lang.String varname)
YoVariableHolder
hasUniqueVariable
in interface YoVariableHolder
nameSpace
- String NameSpace ending of YoVariable to check for. The YoVariable's nameSpace ending must match that of nameSpace.varname
- String Name of YoVariable to check for. If contains a ".", then throws a RuntimeException.
public java.util.ArrayList<YoVariable> getVariables(java.lang.String nameSpace, java.lang.String varname)
YoVariableHolder
getVariables
in interface YoVariableHolder
nameSpace
- String NameSpace ending of YoVariables to get. The YoVariable's nameSpace ending must match that of nameSpace.varname
- String Name of YoVariable to get. If contains a ".", then throws a RuntimeException.
public java.util.ArrayList<YoVariable> getVariables(java.lang.String varname)
YoVariableHolder
getVariables
in interface YoVariableHolder
varname
- String Name of YoVariable to get. If name contains a ".", then the YoVariable's nameSpace ending must match that of name.
public java.util.ArrayList<YoVariable> getVariables(NameSpace nameSpace)
YoVariableHolder
getVariables
in interface YoVariableHolder
nameSpace
- NameSpace to match.
public void registerVariable(YoVariable variable)
public java.util.ArrayList<YoVariable> getVariablesThatContain(java.lang.String searchString, boolean caseSensitive)
public java.util.ArrayList<YoVariable> getVariablesThatStartWith(java.lang.String searchString)
public java.util.ArrayList<YoVariable> getVars(java.lang.String[] varNames, java.lang.String[] regularExpressions)
public void closeAndDispose()
public void setRobots(Robot[] robots)
public DataBuffer getDataBuffer()
public Robot[] getRobots()
public VarList getCombinedVarList()
public void setSimulateDoneCriterion(SimulationDoneCriterion criterion)
public void addSimulateDoneListener(SimulationDoneListener listener)
public void removeSimulateDoneListener(SimulationDoneListener listener)
public void notifySimulateDoneListeners()
public void notifySimulateDoneListenersOfException(java.lang.Throwable throwable)
public boolean checkSimulateDoneCriterion()
public void simulate(int numTicks) throws UnreasonableAccelerationException
UnreasonableAccelerationException
public void tickAndUpdate()
public void simulate(double simulationTime) throws UnreasonableAccelerationException
UnreasonableAccelerationException
public void setupSimulationGraphics(java.util.ArrayList<GraphicsRobot> graphicsRobotsToUpdate)
public Graphics3DAdapter getSimulationGraphics()
public void addVarList(VarList newVarList) throws DataBuffer.RepeatDataBufferEntryException
DataBuffer.RepeatDataBufferEntryException
public void registerCollisionGroup(CollisionGroup group)
public void registerCollisionGroups(java.util.ArrayList<CollisionGroup> groups)
public SimulationSynchronizer getSimulationSynchronizer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |