Uses of Package
com.jmex.subdivision

Packages that use com.jmex.subdivision
com.jmex.subdivision   
 

Classes in com.jmex.subdivision used by com.jmex.subdivision
Subdivision
          An abstract class for subdivision of surfaces.
Implementing classes must implement prepare() and doSubdivide() and preferrably override computeNormals(TriMesh batch)

Usage of subclass SubdivisionButterfly:

TriMesh mesh = {some trimesh};
Subdivision subdivision = new SubdivisionButterfly(mesh.getBatch(0)); // prepare for subdivision
subdivision.subdivide(); // subdivide
subdivision.apply(); // Applies the new subdivided buffers to the batch
subdivision.computeNormals(); // calculate new normals


Or you can use it without giving it a batch:

Subdivision subdivision = new SubdivisionButterfly();
subdivision.setVertexBuffer(batch.getVertexBuffer());
subdivision.setIndexBuffer(batch.getIndexBuffer());
subdivision.addToBufferList(batch.getTextureBuffer(0), Subdivision.BufferType.TEXTUREBUFFER);
subdivision.addToBufferList(batch.getTextureBuffer(1), Subdivision.BufferType.TEXTUREBUFFER);
subdivision.addToBufferList(batch.getColorBuffer(), Subdivision.BufferType.COLORBUFFER);
subdivision.subdivide(); // subdivide
subdivision.apply(mesh.getBatch(0)); // Applies the new subdivided buffers to the batch
subdivision.computeNormals(mesh.getBatch(0)); // calculate new normals
Subdivision.BufferType
          Buffer types.
Subdivision.SubdivisionBuffer
           
SubdivisionButterfly.Edge
          Inner helper class for SubdivisonBatch to keep track of the edges
SubdivisionButterfly.Location
          Whether the vertex is interior or lies on a boundary
SubdivisionButterfly.Rule
          Which rule to use when splitting a certain Edge
See Page 73-75 in SIGGRAPH 2000 Course Notes, Denis Zorin, et al.
SubdivisionButterfly.Triangle
          Inner helper class for SubdivisonBatch to keep track of the triangles
SubdivisionButterfly.Valence
          Regular: Valence==6 for interior vertices, Valence==4 for boundary/crease vertices Extraordinary: Everything else
SubdivisionButterfly.VertexType
          Helper class to calculate which Rule to use when splitting an Edge whose vertices have Location and Valence Call: VertexType.getRule(valence1, location1, valence2, location2);
Vector
          Helper class for SubdivisionBatch to do vector math with any size on the vectors