org.jmol.jvxl.calc
Class MarchingCubes

java.lang.Object
  extended by org.jmol.jvxl.calc.MarchingCubes

public class MarchingCubes
extends java.lang.Object


Field Summary
private  int contourType
           
private  int cubeCountX
           
private  int cubeCountY
           
private  int cubeCountZ
           
(package private) static javax.vecmath.Point3i[] cubeVertexOffsets
           
(package private) static javax.vecmath.Vector3f[] cubeVertexVectors
           
private  float cutoff
           
(package private)  int edgeCount
           
private static int[] edgeTypeTable
           
private  javax.vecmath.Vector3f[] edgeVectors
           
private static byte[] edgeVertexes
           
private static short[] insideMaskTable
           
private  boolean isContoured
           
private  boolean isCutoffAbsolute
           
(package private)  boolean isXLowToHigh
           
private  int[] linearOffsets
           
private  int[] nullNeighbor
           
private  javax.vecmath.Point3f pointA
           
private  javax.vecmath.Point3f pt0
           
private static byte[][] triangleTable2
           
private  javax.vecmath.Point3i[] vertexPoints
           
private  float[] vertexValues
           
private  VolumeData volumeData
           
private  VertexDataServer voxelReader
           
 javax.vecmath.Vector3f[] voxelVertexVectors
           
(package private)  int xyCount
           
 
Constructor Summary
MarchingCubes(VertexDataServer voxelReader, VolumeData volumeData, boolean isContoured, int contourType, float cutoff, boolean isCutoffAbsolute)
           
 
Method Summary
 void calcVertexPoint(int x, int y, int z, int vertex, javax.vecmath.Point3f pt)
           
private  void calcVoxelVertexVectors()
           
 int generateSurfaceData(boolean isXLowToHigh)
           
 int getLinearOffset(int x, int y, int z, int offset)
           
static boolean isInside(float voxelValue, float max, boolean isAbsolute)
           
private  boolean processOneCubical(int insideMask, int[] voxelPointIndexes, int x, int y, int z)
           
private  int[] propagateNeighborPointIndexes(int x, int y, int z, int[][] isoPointIndexes)
           
(package private)  void setLinearOffsets()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

voxelReader

private VertexDataServer voxelReader

volumeData

private VolumeData volumeData

contourType

private int contourType

isContoured

private boolean isContoured

cutoff

private float cutoff

isCutoffAbsolute

private boolean isCutoffAbsolute

cubeCountX

private int cubeCountX

cubeCountY

private int cubeCountY

cubeCountZ

private int cubeCountZ

voxelVertexVectors

public final javax.vecmath.Vector3f[] voxelVertexVectors

vertexValues

private final float[] vertexValues

vertexPoints

private final javax.vecmath.Point3i[] vertexPoints

edgeVectors

private final javax.vecmath.Vector3f[] edgeVectors

linearOffsets

private final int[] linearOffsets

xyCount

int xyCount

isXLowToHigh

boolean isXLowToHigh

edgeCount

int edgeCount

nullNeighbor

private final int[] nullNeighbor

pt0

private final javax.vecmath.Point3f pt0

pointA

private final javax.vecmath.Point3f pointA

cubeVertexOffsets

static final javax.vecmath.Point3i[] cubeVertexOffsets

cubeVertexVectors

static javax.vecmath.Vector3f[] cubeVertexVectors

edgeTypeTable

private static final int[] edgeTypeTable

edgeVertexes

private static final byte[] edgeVertexes

insideMaskTable

private static final short[] insideMaskTable

triangleTable2

private static final byte[][] triangleTable2
Constructor Detail

MarchingCubes

public MarchingCubes(VertexDataServer voxelReader,
                     VolumeData volumeData,
                     boolean isContoured,
                     int contourType,
                     float cutoff,
                     boolean isCutoffAbsolute)
Method Detail

calcVoxelVertexVectors

private void calcVoxelVertexVectors()

generateSurfaceData

public int generateSurfaceData(boolean isXLowToHigh)

isInside

public static boolean isInside(float voxelValue,
                               float max,
                               boolean isAbsolute)

setLinearOffsets

void setLinearOffsets()

getLinearOffset

public int getLinearOffset(int x,
                           int y,
                           int z,
                           int offset)

propagateNeighborPointIndexes

private int[] propagateNeighborPointIndexes(int x,
                                            int y,
                                            int z,
                                            int[][] isoPointIndexes)

processOneCubical

private boolean processOneCubical(int insideMask,
                                  int[] voxelPointIndexes,
                                  int x,
                                  int y,
                                  int z)

calcVertexPoint

public void calcVertexPoint(int x,
                            int y,
                            int z,
                            int vertex,
                            javax.vecmath.Point3f pt)