org.openscience.jvxl.simplewriter
Class SimpleMarchingCubes

java.lang.Object
  extended by org.openscience.jvxl.simplewriter.SimpleMarchingCubes

public class SimpleMarchingCubes
extends java.lang.Object


Field Summary
(package private)  java.util.BitSet bsValues
           
private  java.util.BitSet bsVoxels
           
private  float calculatedArea
           
private  float calculatedVolume
           
private  int cubeCountX
           
private  int cubeCountY
           
private  int cubeCountZ
           
private static javax.vecmath.Point3i[] cubeVertexOffsets
           
private static javax.vecmath.Vector3f[] cubeVertexVectors
           
private  float cutoff
           
private  boolean doCalcArea
           
private  boolean doSaveSurfacePoints
           
(package private)  int edgeCount
           
private  int[] edgePointIndexes
           
private static int[] edgeTypeTable
           
private  javax.vecmath.Vector3f[] edgeVectors
           
private static byte[] edgeVertexes
           
private  int[] edgeVertexPlanes
           
private static int[] edgeVertexPlanesHighToLow
           
private static int[] edgeVertexPlanesLowToHigh
           
private  int[] edgeVertexPointers
           
private static int[] edgeVertexPointersHighToLow
           
private static int[] edgeVertexPointersLowToHigh
           
private  java.lang.StringBuffer fractionData
           
private static short[] insideMaskTable
           
private  boolean isCutoffAbsolute
           
private  int[][][] isoPointIndexPlanes
           
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 static int[] Pwr2
           
private  java.util.Vector surfacePoints
           
private static byte[][] triangleTable2
           
(package private)  javax.vecmath.Vector3f vAB
           
(package private)  javax.vecmath.Vector3f vAC
           
private  VoxelDataCreator vdc
           
private  javax.vecmath.Point3i[] vertexPoints
           
private  float[] vertexValues
           
private  VolumeData volumeData
           
private  javax.vecmath.Vector3f[] voxelVertexVectors
           
(package private)  javax.vecmath.Vector3f vTemp
           
private static int[] xyPlanePts
           
private  float[][] xyPlanes
           
private  int yzCount
           
 
Constructor Summary
SimpleMarchingCubes(VoxelDataCreator vdc, VolumeData volumeData, float cutoff, boolean isCutoffAbsolute, boolean isXLowToHigh, java.util.Vector surfacePointsReturn, boolean doCalcArea)
           
 
Method Summary
private  void addTriangle(int ia, int ib, int ic, int edgeType)
           
private  void calcVoxelVertexVectors()
           
 java.util.BitSet getBsVoxels()
           
 float getCalculatedArea()
           
 float getCalculatedVolume()
           
 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  int newVertex(javax.vecmath.Point3f pointA, javax.vecmath.Vector3f edgeVector, float f)
           
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

volumeData

private VolumeData volumeData

cutoff

private float cutoff

isCutoffAbsolute

private boolean isCutoffAbsolute

isXLowToHigh

private boolean isXLowToHigh

doCalcArea

private boolean doCalcArea

doSaveSurfacePoints

private boolean doSaveSurfacePoints

calculatedArea

private float calculatedArea

calculatedVolume

private float calculatedVolume

surfacePoints

private java.util.Vector surfacePoints

fractionData

private java.lang.StringBuffer fractionData

cubeCountX

private int cubeCountX

cubeCountY

private int cubeCountY

cubeCountZ

private int cubeCountZ

nY

private int nY

nZ

private int nZ

yzCount

private int yzCount

bsVoxels

private java.util.BitSet bsVoxels

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

vdc

private VoxelDataCreator vdc

vertexValues

private final float[] vertexValues

vertexPoints

private final javax.vecmath.Point3i[] vertexPoints

edgeCount

int edgeCount

voxelVertexVectors

private final javax.vecmath.Vector3f[] voxelVertexVectors

edgeVectors

private final javax.vecmath.Vector3f[] edgeVectors

cubeVertexVectors

private static final javax.vecmath.Vector3f[] cubeVertexVectors

xyPlanePts

private static int[] xyPlanePts

edgePointIndexes

private final int[] edgePointIndexes

isoPointIndexPlanes

private int[][][] isoPointIndexPlanes

xyPlanes

private float[][] xyPlanes

vTemp

javax.vecmath.Vector3f vTemp

vAC

javax.vecmath.Vector3f vAC

vAB

javax.vecmath.Vector3f vAB

bsValues

java.util.BitSet bsValues

pt0

private final javax.vecmath.Point3f pt0

pointA

private final javax.vecmath.Point3f pointA

Pwr2

private static final int[] Pwr2

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

linearOffsets

private final int[] linearOffsets

cubeVertexOffsets

private static final javax.vecmath.Point3i[] cubeVertexOffsets

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

SimpleMarchingCubes

public SimpleMarchingCubes(VoxelDataCreator vdc,
                           VolumeData volumeData,
                           float cutoff,
                           boolean isCutoffAbsolute,
                           boolean isXLowToHigh,
                           java.util.Vector surfacePointsReturn,
                           boolean doCalcArea)
Method Detail

getCalculatedArea

public float getCalculatedArea()

getCalculatedVolume

public float getCalculatedVolume()

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)

isInside

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

getValue

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

processOneCubical

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

newVertex

private int newVertex(javax.vecmath.Point3f pointA,
                      javax.vecmath.Vector3f edgeVector,
                      float f)

setLinearOffsets

private void setLinearOffsets()

getLinearOffset

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