org.jmol.jvxl.calc
Class MarchingCubes

java.lang.Object
  extended by org.jmol.jvxl.calc.TriangleData
      extended by org.jmol.jvxl.calc.MarchingCubes
All Implemented Interfaces:
TriangleServer

public class MarchingCubes
extends TriangleData


Field Summary
private  java.util.BitSet bsValues
           
private  java.util.BitSet bsVoxels
           
private  int contourType
           
private  int cubeCountX
           
private  int cubeCountY
           
private  int cubeCountZ
           
private static javax.vecmath.Vector3f[] cubeVertexVectors
           
private  float cutoff
           
(package private)  int edgeCount
           
private  java.lang.StringBuffer edgeData
           
private  int[] edgePointIndexes
           
private static int[] edgeTypeTable
           
private  javax.vecmath.Vector3f[] edgeVectors
           
private  int[] edgeVertexPlanes
           
private static int[] edgeVertexPlanesHighToLow
           
private static int[] edgeVertexPlanesLowToHigh
           
private  int[] edgeVertexPointers
           
private static int[] edgeVertexPointersHighToLow
           
private static int[] edgeVertexPointersLowToHigh
           
private  float fractionOutside
           
private  float[] fReturn
           
private static short[] insideMaskTable
           
private  boolean integrateSquared
           
private  boolean isContoured
           
private  boolean isCutoffAbsolute
           
private  int[][][] isoPointIndexPlanes
           
private  boolean isSquared
           
private  boolean isXLowToHigh
           
private  int[] linearOffsets
           
private  int mode
           
private static int MODE_BITSET
           
private static int MODE_CUBE
           
private static int MODE_GETXYZ
           
private  int nY
           
private  int nZ
           
private  javax.vecmath.Point3f pointA
           
private  javax.vecmath.Point3f pt0
           
private  VertexDataServer surfaceReader
           
private  float[] vertexValues
           
private  VolumeData volumeData
           
private  javax.vecmath.Vector3f[] voxelVertexVectors
           
(package private)  javax.vecmath.Vector3f vTemp
           
private  int yzCount
           
private static int[] yzPlanePts
           
private  float[][] yzPlanes
           
 
Fields inherited from class org.jmol.jvxl.calc.TriangleData
cubeVertexOffsets, edgeVertexes, Pwr2, triangleTable2
 
Constructor Summary
MarchingCubes()
           
MarchingCubes(VertexDataServer surfaceReader, VolumeData volumeData, java.util.BitSet bsVoxels, boolean isContoured, int contourType, float cutoff, boolean isCutoffAbsolute, boolean isSquared, boolean isXLowToHigh)
           
 
Method Summary
private  void addTriangle(int ia, int ib, int ic, int edgeType)
           
 void calcVertexPoint(int x, int y, int z, int vertex, javax.vecmath.Point3f pt)
           
private  void calcVoxelVertexVectors()
           
 java.util.BitSet getBsVoxels()
           
 java.lang.String getEdgeData()
           
 int getLinearOffset(int x, int y, int z, int offset)
           
private  float getValue(int i, int x, int y, int z, int pt, float[] tempValues)
           
static boolean isInside(float voxelValue, float max, boolean isAbsolute)
           
private  boolean processOneCubical(int insideMask, int x, int y, int z, int pt)
           
private  int[][] resetIndexPlane(int[][] plane)
           
private  void setLinearOffsets()
           
 
Methods inherited from class org.jmol.jvxl.calc.TriangleData
getCubeVertexOffsets, intersectPlane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

surfaceReader

private VertexDataServer surfaceReader

volumeData

private VolumeData volumeData

contourType

private int contourType

isContoured

private boolean isContoured

cutoff

private float cutoff

isCutoffAbsolute

private boolean isCutoffAbsolute

isSquared

private boolean isSquared

isXLowToHigh

private boolean isXLowToHigh

cubeCountX

private int cubeCountX

cubeCountY

private int cubeCountY

cubeCountZ

private int cubeCountZ

nY

private int nY

nZ

private int nZ

yzCount

private int yzCount

fractionOutside

private float fractionOutside

integrateSquared

private boolean integrateSquared

bsVoxels

private java.util.BitSet bsVoxels

edgeData

private java.lang.StringBuffer edgeData

mode

private int mode

MODE_CUBE

private static final int MODE_CUBE
See Also:
Constant Field Values

MODE_BITSET

private static final int MODE_BITSET
See Also:
Constant Field Values

MODE_GETXYZ

private static final int MODE_GETXYZ
See Also:
Constant Field Values

vertexValues

private final float[] vertexValues

edgeCount

int edgeCount

voxelVertexVectors

private final javax.vecmath.Vector3f[] voxelVertexVectors

edgeVectors

private final javax.vecmath.Vector3f[] edgeVectors

yzPlanePts

private static int[] yzPlanePts

edgePointIndexes

private final int[] edgePointIndexes

isoPointIndexPlanes

private int[][][] isoPointIndexPlanes

yzPlanes

private float[][] yzPlanes

vTemp

javax.vecmath.Vector3f vTemp

bsValues

private java.util.BitSet bsValues

pt0

private final javax.vecmath.Point3f pt0

pointA

private final javax.vecmath.Point3f pointA

edgeVertexPointersLowToHigh

private static final int[] edgeVertexPointersLowToHigh

edgeVertexPointersHighToLow

private static final int[] edgeVertexPointersHighToLow

edgeVertexPointers

private int[] edgeVertexPointers

edgeVertexPlanesLowToHigh

private static final int[] edgeVertexPlanesLowToHigh

edgeVertexPlanesHighToLow

private static final int[] edgeVertexPlanesHighToLow

edgeVertexPlanes

private int[] edgeVertexPlanes

fReturn

private float[] fReturn

cubeVertexVectors

private static final javax.vecmath.Vector3f[] cubeVertexVectors

edgeTypeTable

private static final int[] edgeTypeTable

linearOffsets

private final int[] linearOffsets

insideMaskTable

private static final short[] insideMaskTable
Constructor Detail

MarchingCubes

public MarchingCubes()

MarchingCubes

public MarchingCubes(VertexDataServer surfaceReader,
                     VolumeData volumeData,
                     java.util.BitSet bsVoxels,
                     boolean isContoured,
                     int contourType,
                     float cutoff,
                     boolean isCutoffAbsolute,
                     boolean isSquared,
                     boolean isXLowToHigh)
Method Detail

getBsVoxels

public java.util.BitSet getBsVoxels()

calcVoxelVertexVectors

private void calcVoxelVertexVectors()

resetIndexPlane

private int[][] resetIndexPlane(int[][] plane)

getEdgeData

public java.lang.String getEdgeData()

addTriangle

private void addTriangle(int ia,
                         int ib,
                         int ic,
                         int edgeType)

getValue

private float getValue(int i,
                       int x,
                       int y,
                       int z,
                       int pt,
                       float[] tempValues)

isInside

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

processOneCubical

private boolean processOneCubical(int insideMask,
                                  int x,
                                  int y,
                                  int z,
                                  int pt)

calcVertexPoint

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

setLinearOffsets

private void setLinearOffsets()

getLinearOffset

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