|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jocl.cloth.Simulator
class Simulator
Simple implementation of a Simulator
| Constructor Summary | |
|---|---|
Simulator(java.util.concurrent.Semaphore renderingSemaphore)
Creates a new simulator using the given semaphore. |
|
| Method Summary | |
|---|---|
(package private) void |
addTimeStepListener(TimeStepListener timeStepListener)
Add the given listener to receive notifications about time steps |
protected void |
notifyAfterTimeStep(float totalTime,
float timeStepSize)
Notify all listeners about a time step |
protected void |
notifyBeforeTimeStep(float totalTime,
float timeStepSize)
Notify all listeners about a time step |
(package private) void |
removeTimeStepListener(TimeStepListener timeStepListener)
Remove the given listener |
(package private) void |
setPaused(boolean newPaused)
Set whether the simulation should be paused |
(package private) void |
setSimulation(Simulation simulation)
Set the Simulation driven by this simulator. |
(package private) void |
start()
Start the simulation thread. |
(package private) void |
stop()
Stop the simulator as soon as possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
Simulator(java.util.concurrent.Semaphore renderingSemaphore)
renderingSemaphore - The rendering semaphore. May be null.| Method Detail |
|---|
void setSimulation(Simulation simulation)
simulation - The Simulationvoid start()
void setPaused(boolean newPaused)
newPaused - Whether the simulation should be pausedvoid stop()
void addTimeStepListener(TimeStepListener timeStepListener)
timeStepListener - The listener to addvoid removeTimeStepListener(TimeStepListener timeStepListener)
timeStepListener - The listener to add
protected void notifyBeforeTimeStep(float totalTime,
float timeStepSize)
totalTime - The total simulation timetimeStepSize - The time step size
protected void notifyAfterTimeStep(float totalTime,
float timeStepSize)
totalTime - The total simulation timetimeStepSize - The time step size
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||