org.jocl.cloth
Class NormalComputerJOCL

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

 class NormalComputerJOCL
extends java.lang.Object
implements NormalComputer

Implementation of a NormalComputer using OpenCL


Constructor Summary
NormalComputerJOCL(CLSetup clSetup, ParticleData p, ResourceHandle<org.jocl.cl_mem> positions, FaceData f, NormalData n, ResourceHandle<org.jocl.cl_mem> vertexNormals, ResourceHandle<java.nio.FloatBuffer> renderingVertexNormals)
          Creates a new normal computer.
 
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

NormalComputerJOCL

NormalComputerJOCL(CLSetup clSetup,
                   ParticleData p,
                   ResourceHandle<org.jocl.cl_mem> positions,
                   FaceData f,
                   NormalData n,
                   ResourceHandle<org.jocl.cl_mem> vertexNormals,
                   ResourceHandle<java.nio.FloatBuffer> renderingVertexNormals)
Creates a new normal computer.

Parameters:
clSetup - The OpenCL setup
p - The ParticleData
positions - The vertex positions handle
f - The FaceData
n - The NormalData
vertexNormals - The vertex normals handle
renderingVertexNormals -
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