org.jocl.cloth
Class ClothSimulationJava

java.lang.Object
  extended by org.jocl.cloth.ClothSimulationJava
All Implemented Interfaces:
Simulation

 class ClothSimulationJava
extends java.lang.Object
implements Simulation

Implementation of a Simulation that performs a cloth simulation with plain Java. It combines a simulation core, namely a ClothSimulationCoreJava, with a NormalComputerJava.


Constructor Summary
ClothSimulationJava(SimData simData, de.javagl.simplerenderer.SimpleRenderer renderer, de.javagl.simplerenderer.SimpleObject clothObject)
          Creates a new cloth simulation from the given data
 
Method Summary
 void performTimeStep(float timeStep)
          Perform a simulation step with the given size
 void prepareRendering()
          Perform any steps necessary to render the current simulation state
 void shutdown()
          Shut down the simulation and free all allocated resources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClothSimulationJava

ClothSimulationJava(SimData simData,
                    de.javagl.simplerenderer.SimpleRenderer renderer,
                    de.javagl.simplerenderer.SimpleObject clothObject)
Creates a new cloth simulation from the given data

Parameters:
simData - The SimData
renderer - The renderer. May be null.
clothObject - The cloth object. May be null if the renderer is null.
Method Detail

performTimeStep

public void performTimeStep(float timeStep)
Description copied from interface: Simulation
Perform a simulation step with the given size

Specified by:
performTimeStep in interface Simulation
Parameters:
timeStep - The step size

prepareRendering

public void prepareRendering()
Description copied from interface: Simulation
Perform any steps necessary to render the current simulation state

Specified by:
prepareRendering in interface Simulation

shutdown

public void shutdown()
Description copied from interface: Simulation
Shut down the simulation and free all allocated resources

Specified by:
shutdown in interface Simulation