rlaramee
Class MarchingCubesCases
java.lang.Object
|
+--rlaramee.MarchingCubesCases
- public class MarchingCubesCases
- extends java.lang.Object
Description: Marching Cubes Cases is a case table for generating
isosurfaces. The marching cubes algorithm assumes that a
contour can only pass through a cell in a finite number of ways. A case
table is constructed enumerates all possible topoligical states of a cell,
given combinations of scalar values at the cell points. The number of
topological states depends on the number of cell vertices, and the number
of inside/outside relationships a vertex can have with respect to the
contour value. A vertex is considered inside[outside] a contour if its
scalar value is larger[smaller] than the scalar value of the contour line.
There are 256 different combinations of scalar value, given that there
are eight points in a cubical cell [i.e., 2 exp(8) combinations]. For more
information refer to page 147 of The Visualization Toolkit.
start date Sat 01 May 1999
- Version:
- 1.0
- Author:
- Robert S Laramee
- See Also:
MarchingCubes
Field Summary |
(package private) static byte[][] |
triangleCases
"Edges to intersect. |
Method Summary |
static byte[] |
getEdges(short index)
Returns a set of cube edges
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
triangleCases
static byte[][] triangleCases
- "Edges to intersect. Three at a time form a triangle."
Each of these unit-less numbers identifies an edge e.g. 0 means edge 0
The edges come in sets of three because we are generating triangles.
Here's a edge to vertex pair mapping:
Edge Vertex Pair
---- -----------
0 0,1
1 1,2
2 2,3
3 3,0
4 4,5
5 5,6
6 6,7
7 7,4
8 0,4
9 1,5
10 3,7
11 2,6
MarchingCubesCases
public MarchingCubesCases()
getEdges
public static byte[] getEdges(short index)
- Returns a set of cube edges
- Parameters:
index
- an index into the case table- Returns:
- edges -a list of cube edges