org.jocl.cloth
Class NormalComputerJava

java.lang.Object
  extended by org.jocl.cloth.NormalComputerJava
All Implemented Interfaces:
NormalComputer

 class NormalComputerJava
extends java.lang.Object
implements NormalComputer

Simple implementation of a NormalComputer using Java


Constructor Summary
NormalComputerJava(ResourceHandle<java.nio.FloatBuffer> vertexNormalsHandle, ParticleData p, FaceData f, NormalData n)
          Creates a new normal computer that uses the given simulation- and normal data, and writes the vertex normals into the buffer obtained from the given handle.
 
Method Summary
 void shutdown()
          Shut down and free all alocated resources
 void updateNormals()
          Update the normals
 void writeNormals()
          Write the normals data into a target buffer, if necessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalComputerJava

NormalComputerJava(ResourceHandle<java.nio.FloatBuffer> vertexNormalsHandle,
                   ParticleData p,
                   FaceData f,
                   NormalData n)
Creates a new normal computer that uses the given simulation- and normal data, and writes the vertex normals into the buffer obtained from the given handle.

Parameters:
vertexNormalsHandle - The handle for the vertex normals buffer
p - The ParticleData
f - The FaceData
n - The NormalData
Method Detail

writeNormals

public void writeNormals()
Description copied from interface: NormalComputer
Write the normals data into a target buffer, if necessary

Specified by:
writeNormals in interface NormalComputer

updateNormals

public void updateNormals()
Description copied from interface: NormalComputer
Update the normals

Specified by:
updateNormals in interface NormalComputer

shutdown

public void shutdown()
Description copied from interface: NormalComputer
Shut down and free all alocated resources

Specified by:
shutdown in interface NormalComputer