org.jocl.cloth
Class ClothData

java.lang.Object
  extended by org.jocl.cloth.ClothData
All Implemented Interfaces:
de.javagl.simplemesh.MeshPrimitives, java.io.Serializable

public class ClothData
extends java.lang.Object
implements de.javagl.simplemesh.MeshPrimitives

MeshPrimitives extended by the information that is required for the simulation, namely the bending edges, and a list of all edges.

See Also:
Serialized Form

Constructor Summary
ClothData(java.util.Collection<? extends de.javagl.simplemesh.Vertex> vertices, java.util.Collection<? extends de.javagl.simplemesh.Edge> edges, java.util.Collection<? extends de.javagl.simplemesh.Face> faces, java.util.Collection<? extends de.javagl.simplemesh.Edge> bendingEdges, java.util.Collection<? extends de.javagl.simplemesh.Edge> allSimulationEdges)
          Creates a ClothData that contains copies of the given collections.
ClothData(de.javagl.simplemesh.MeshPrimitives meshPrimitives)
          Creates a new ClothData from the given mesh primitives
 
Method Summary
 java.util.List<de.javagl.simplemesh.Edge> getAllSimulationEdges()
          Returns an unmodifiable list of all simulation edges.
 java.util.List<de.javagl.simplemesh.Edge> getBendingEdges()
          Returns an unmodifiable list of the bending edges.
 java.util.List<de.javagl.simplemesh.Edge> getEdges()
           
 java.util.List<de.javagl.simplemesh.Face> getFaces()
           
 java.util.List<de.javagl.simplemesh.Vertex> getVertices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClothData

public ClothData(de.javagl.simplemesh.MeshPrimitives meshPrimitives)
Creates a new ClothData from the given mesh primitives

Parameters:
meshPrimitives - The mesh primitives

ClothData

ClothData(java.util.Collection<? extends de.javagl.simplemesh.Vertex> vertices,
          java.util.Collection<? extends de.javagl.simplemesh.Edge> edges,
          java.util.Collection<? extends de.javagl.simplemesh.Face> faces,
          java.util.Collection<? extends de.javagl.simplemesh.Edge> bendingEdges,
          java.util.Collection<? extends de.javagl.simplemesh.Edge> allSimulationEdges)
Creates a ClothData that contains copies of the given collections.

Parameters:
vertices - The vertices
edges - The edges
faces - The faces
bendingEdges - The bending edges
allSimulationEdges - The simulation edges
Method Detail

getVertices

public java.util.List<de.javagl.simplemesh.Vertex> getVertices()
Specified by:
getVertices in interface de.javagl.simplemesh.MeshPrimitives

getEdges

public java.util.List<de.javagl.simplemesh.Edge> getEdges()
Specified by:
getEdges in interface de.javagl.simplemesh.MeshPrimitives

getFaces

public java.util.List<de.javagl.simplemesh.Face> getFaces()
Specified by:
getFaces in interface de.javagl.simplemesh.MeshPrimitives

getBendingEdges

public java.util.List<de.javagl.simplemesh.Edge> getBendingEdges()
Returns an unmodifiable list of the bending edges.

Returns:
The list of bending edges.

getAllSimulationEdges

public java.util.List<de.javagl.simplemesh.Edge> getAllSimulationEdges()
Returns an unmodifiable list of all simulation edges. The list contains edges that have the same vertices as the edges obtained by getEdges(), and edges that have the same vertices as the ones obtained by getBendingEdges(), with indices reflecting their position in the returned list.

Returns:
The list of edges.