org.jmol.jvxl.api
Interface MeshDataServer

All Superinterfaces:
VertexDataServer
All Known Implementing Classes:
Isosurface, LcaoCartoon, MolecularOrbital

public interface MeshDataServer
extends VertexDataServer


Method Summary
 void addTriangleCheck(int iA, int iB, int iC, int check, boolean isAbsolute)
          addTriangleCheck adds a triangle along with a 3-bit check indicating which edges to draw in mesh mode: 1 (iA-iB) + 2 (iB-iC) + 4 (iC-iA)
 int addVertexCopy(javax.vecmath.Point3f vertexXYZ, float value, int assocVertex)
          addVertexCopy is used by the Marching Squares algorithm to uniquely identify a new vertex when an edge is crossed in the 2D plane.
 javax.vecmath.Point3f[] calculateGeodesicSurface(java.util.BitSet bsSelected, float envelopeRadius)
           
 void fillMeshData(MeshData meshData, int mode)
           
 int getSurfacePointIndex(float cutoff, boolean isCutoffAbsolute, int x, int y, int z, javax.vecmath.Point3i offset, int vertexA, int vertexB, float valueA, float valueB, javax.vecmath.Point3f pointA, javax.vecmath.Vector3f edgeVector, boolean isContourType)
          getSurfacePointIndex is used by the Marching Cubes algorithm and must return a unique integer identifier for a vertex created by the Marching Cube algorithm when it finds an edge.
 void invalidateTriangles()
           
 void notifySurfaceGenerationCompleted()
           
 void notifySurfaceMappingCompleted()
           
 

Method Detail

getSurfacePointIndex

int getSurfacePointIndex(float cutoff,
                         boolean isCutoffAbsolute,
                         int x,
                         int y,
                         int z,
                         javax.vecmath.Point3i offset,
                         int vertexA,
                         int vertexB,
                         float valueA,
                         float valueB,
                         javax.vecmath.Point3f pointA,
                         javax.vecmath.Vector3f edgeVector,
                         boolean isContourType)
getSurfacePointIndex is used by the Marching Cubes algorithm and must return a unique integer identifier for a vertex created by the Marching Cube algorithm when it finds an edge. If a vertex is discarded, then Integer.MAX_VALUE should be returned. the 3D coordinate of the point can be calculated using surfacePoint.scaleAdd(fraction, edgeVector, pointA); where fraction is generally calculated as: fraction = (cutoff - valueA) / (valueB - valueA); if (isCutoffAbsolute && (fraction < 0 || fraction > 1)) fraction = (-cutoff - valueA) / (valueB - valueA); This method is also used by MarchingCubes to deliver the appropriate oblique planar coordinate to MarchingSquares for later contouring.

Specified by:
getSurfacePointIndex in interface VertexDataServer
Parameters:
cutoff -
isCutoffAbsolute -
x -
y -
z -
offset -
vertexA - [0:7]
vertexB - [0:7]
valueA -
valueB -
pointA -
edgeVector - vector from A to B
isContourType -
Returns:
new vertex index or Integer.MAX_VALUE

addVertexCopy

int addVertexCopy(javax.vecmath.Point3f vertexXYZ,
                  float value,
                  int assocVertex)
addVertexCopy is used by the Marching Squares algorithm to uniquely identify a new vertex when an edge is crossed in the 2D plane. The implementing method should COPY the Point3f using Point3f.set(). The data consumer can use the association key to group this vertex with others near the same gridpoint.

Specified by:
addVertexCopy in interface VertexDataServer
Parameters:
vertexXYZ -
value -
assocVertex - unique association vertex or -1
Returns:
new vertex index

addTriangleCheck

void addTriangleCheck(int iA,
                      int iB,
                      int iC,
                      int check,
                      boolean isAbsolute)
addTriangleCheck adds a triangle along with a 3-bit check indicating which edges to draw in mesh mode: 1 (iA-iB) + 2 (iB-iC) + 4 (iC-iA)

Specified by:
addTriangleCheck in interface VertexDataServer
Parameters:
iA -
iB -
iC -
check -
isAbsolute -

invalidateTriangles

void invalidateTriangles()

fillMeshData

void fillMeshData(MeshData meshData,
                  int mode)

notifySurfaceGenerationCompleted

void notifySurfaceGenerationCompleted()

notifySurfaceMappingCompleted

void notifySurfaceMappingCompleted()

calculateGeodesicSurface

javax.vecmath.Point3f[] calculateGeodesicSurface(java.util.BitSet bsSelected,
                                                 float envelopeRadius)