org.jocl.cloth
Class ClothApplication

java.lang.Object
  extended by org.jocl.cloth.ClothApplication

public class ClothApplication
extends java.lang.Object

Main class for the cloth simulation application


Constructor Summary
ClothApplication()
          Creates the main application
 
Method Summary
(package private)  void cleanup()
          Stops the simulator, shuts down the simulation and clears the renderer
protected  void createGUI()
          Creates the GUI
(package private)  de.javagl.simplerenderer.SimpleRenderer getRenderer()
          Returns the renderer
(package private)  Simulator getSimulator()
          Returns the Simulator
(package private)  void initializeSimulation(ClothData clothData, SimData simData)
          Initialize the simulation and rendering using the given ClothData and SimData
static void initLogging()
          Utility method to initialize the logging
static void main(java.lang.String[] args)
          The entry point of this application
(package private)  void setClothOutlined(boolean outlined)
          Set the outlined status of the currently rendered cloth object, if any
(package private)  void setSimulationFactory(SimulationFactory simulationFactory)
          Set the SimulationFactory that should be used when the simulation is initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClothApplication

ClothApplication()
Creates the main application

Method Detail

main

public static void main(java.lang.String[] args)
The entry point of this application

Parameters:
args - Not used

initLogging

public static void initLogging()
Utility method to initialize the logging


createGUI

protected void createGUI()
Creates the GUI


getRenderer

de.javagl.simplerenderer.SimpleRenderer getRenderer()
Returns the renderer

Returns:
The renderer

getSimulator

Simulator getSimulator()
Returns the Simulator

Returns:
The simulator

cleanup

void cleanup()
Stops the simulator, shuts down the simulation and clears the renderer


setSimulationFactory

void setSimulationFactory(SimulationFactory simulationFactory)
Set the SimulationFactory that should be used when the simulation is initialized.

Parameters:
simulationFactory - The factory. May not be null.
Throws:
java.lang.IllegalArgumentException - If the factory is null.

initializeSimulation

void initializeSimulation(ClothData clothData,
                          SimData simData)
Initialize the simulation and rendering using the given ClothData and SimData

Parameters:
clothData - The cloth data
simData - The simulation data

setClothOutlined

void setClothOutlined(boolean outlined)
Set the outlined status of the currently rendered cloth object, if any

Parameters:
outlined - The outlined status