IsoSurface Rendering of an AR Representation

rlaramee
Class OctreeLeafNode

java.lang.Object
  |
  +--rlaramee.OctreeNode
        |
        +--rlaramee.OctreeLeafNode

public class OctreeLeafNode
extends OctreeNode

Description: The Octree is made up of Octree Nodes. In the tree representation, the lower the level nodes store data at a higher resolution. Each node is an octant of a parent node. We may want 2 classes of tree nodes: in memory and external. An external having a seek address or file name.

Internal nodes also have 2 values: the minimum and maximum values of all its decendants [children].

leaf nodes: leaf nodes have 8 data values and a minimum and maximum of those data values. It is the leaf nodes that are rendered.

Each octant is labeled using the convention from page 87 of Applications of Spacial Data Structures by H. Samet.
Note: it is only the labeling convention taken from H. Samet, not the numbering. (H. Samet uses a different numbering convention.) The octants are numbered using the convention from page 233 of The Visualization Toolkit (first edition) Figure 8-11 This is the same as the cube-vertex numbering and labeling.

start date Fri 30 April 1999

Version:
1.0
Author:
Robert S Laramee
See Also:

Fields inherited from class rlaramee.OctreeNode
childNumber, cube, debug, parentNode, processed, siblingNode, triangleList
 
Constructor Summary
OctreeLeafNode(Cube newCube)
          a constructor takes a cube -this constructor is intended to be used to create a real octree node (with all it's data)
 
Method Summary
 boolean addEdgeVertex(SharedEdgeVertex newSharedVertex)
           
 boolean addFacialVertex(SharedFacialVertex newSharedVertex)
           
 void addTriangleEdge(TriangleEdge triangleEdge)
           
 void assembleChainGang()
           
 byte deleteTriangles(IsoSurface surface)
           
 byte faceWithMaxChains()
           
 byte generateTriangleFans(IsoSurface surface)
           
 OctreeARnode getARnode()
           
 OctreeNode getChildZero()
          We need to have this method in place because the Octree.getChild(int childn) method does not know whether it is an internal node or a leaf node.
 java.util.Vector getEdgeVertexList()
           
 java.util.Vector getFacialVertexList()
           
 float getMaximum()
           
 float getMinimum()
           
 byte maxChainsPerFace()
           
 SharedEdgeVertex onCoarseEdge(TriangleVertex fineVertex, byte fineOctant, byte direction)
           
 SharedFacialVertex onCoarseFace(TriangleVertex fineVertex, byte fineOctant, byte direction)
           
 void print()
          print out a node's private data members
 boolean setChildZero(OctreeNode node)
          This is another dummy method so we may treat internal nodes and leaf nodes the same.
 boolean setEdgeVertexList(java.util.Vector newList)
           
 boolean setFacialVertexList(java.util.Vector newList)
           
 boolean setMaximum(float newMax)
           
 boolean setMinimum(float newMin)
          In the Octree.addNodeFromBottom() method, child cubes set their parent's minimum and maximum values.
 java.lang.String toString()
          print out a node's information
 boolean updateEdgeVertices()
           
 
Methods inherited from class rlaramee.OctreeNode
accumulateUniqueDirections, addNodeFromTop, addTriangle, alreadyThere, classifyNode, createChild, createParent, deletePreviousSurface, encompassesSurface, errorCheck, findAncestor, freeMemory, getChild, getChild, getChildNumber, getCube, getEdgeVerticesOfCoarserNeighbor, getFaceNeighbor, getLevel, getNext, getNumTriangles, getParent, getResolution, getSibling, getSibling, getTriangle, getTriangleList, isAdjacent, isEqual, isLeafNode, mapAdjacentChildrenFineToCoarseDir, mapDirectionsFromEdge, mapDirectionsFromOctant, mapOctant, p, p, reflect, removeNodes, removeTriangles, set3pointers, set8children, setChild, setChildNumber, setCube, setLevel, setParent, setResolution, setSibling, setTriangleList, sharedFineEdge, subDivide, traverseChildren, traverseSiblings, updateTriangle
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

OctreeLeafNode

public OctreeLeafNode(Cube newCube)
a constructor takes a cube -this constructor is intended to be used to create a real octree node (with all it's data)

Parameters:
cube - the node's cube (membership)
Method Detail

getMinimum

public float getMinimum()
Overrides:
getMinimum in class OctreeNode
Returns:
minimum -the minimum scalar value of the 8 child nodes

getMaximum

public float getMaximum()
Overrides:
getMaximum in class OctreeNode
Returns:
maximum -the maximum scalar value of the 8 child nodes

setMinimum

public boolean setMinimum(float newMin)
In the Octree.addNodeFromBottom() method, child cubes set their parent's minimum and maximum values. The minimum and maximum values may have to recurse all the way to the top of the tree because all parents are supposed to have the minimum and maximum values of all their children.

Overrides:
setMinimum in class OctreeNode
Parameters:
newMin - a candidate for a new minimum scalar value (of all 8 child nodes)
Returns:
TRUE if the minimum was actually updated

setMaximum

public boolean setMaximum(float newMax)
Overrides:
setMaximum in class OctreeNode
Parameters:
newMax - a candidate for a new maximum scalar value (of all 8 child nodes)
Returns:
TRUE if the maximum was actually updated

getChildZero

public OctreeNode getChildZero()
We need to have this method in place because the Octree.getChild(int childn) method does not know whether it is an internal node or a leaf node.

Overrides:
getChildZero in class OctreeNode
Returns:
null because an OctreeLeafNode has no children

setChildZero

public boolean setChildZero(OctreeNode node)
This is another dummy method so we may treat internal nodes and leaf nodes the same.

Used in the octree traversal and building algorithm(s):

Overrides:
setChildZero in class OctreeNode
Parameters:
node - a parent OctreeNode

getEdgeVertexList

public java.util.Vector getEdgeVertexList()
Overrides:
getEdgeVertexList in class OctreeNode
See Also:
OctreeInternalNode.getEdgeVertexList()

setEdgeVertexList

public boolean setEdgeVertexList(java.util.Vector newList)
Overrides:
setEdgeVertexList in class OctreeNode
See Also:
OctreeInternalNode.setEdgeVertexList()

addEdgeVertex

public boolean addEdgeVertex(SharedEdgeVertex newSharedVertex)
Overrides:
addEdgeVertex in class OctreeNode
See Also:
OctreeInternalNode.addEdgeVertex()

getFacialVertexList

public java.util.Vector getFacialVertexList()
Overrides:
getFacialVertexList in class OctreeNode
See Also:
OctreeInternalNode.getFacialVertexList()

setFacialVertexList

public boolean setFacialVertexList(java.util.Vector newList)
Overrides:
setFacialVertexList in class OctreeNode
See Also:
OctreeInternalNode.setFacialVertexList()

addFacialVertex

public boolean addFacialVertex(SharedFacialVertex newSharedVertex)
Overrides:
addFacialVertex in class OctreeNode
See Also:
OctreeInternalNode.addFacialVertex()

addTriangleEdge

public void addTriangleEdge(TriangleEdge triangleEdge)
Overrides:
addTriangleEdge in class OctreeNode
See Also:
OctreeInternalNode.addTriangleEdge()

updateEdgeVertices

public boolean updateEdgeVertices()
Overrides:
updateEdgeVertices in class OctreeNode
See Also:
OctreeInternalNode.updateEdgeVertices()

onCoarseEdge

public SharedEdgeVertex onCoarseEdge(TriangleVertex fineVertex,
                                     byte fineOctant,
                                     byte direction)
Overrides:
onCoarseEdge in class OctreeNode
See Also:
OctreeARnode.onCoarseEdge()

onCoarseFace

public SharedFacialVertex onCoarseFace(TriangleVertex fineVertex,
                                       byte fineOctant,
                                       byte direction)
Overrides:
onCoarseFace in class OctreeNode
See Also:
OctreeARnode.onCoarseFace()

assembleChainGang

public void assembleChainGang()
Overrides:
assembleChainGang in class OctreeNode
See Also:
OctreeARnode.assembleChainGang()

getARnode

public OctreeARnode getARnode()
Overrides:
getARnode in class OctreeNode
See Also:
OctreeInternalNode.getARnode()

deleteTriangles

public byte deleteTriangles(IsoSurface surface)
Overrides:
deleteTriangles in class OctreeNode
See Also:
OctreeInternalNode.deleteTriangles()

maxChainsPerFace

public byte maxChainsPerFace()
Overrides:
maxChainsPerFace in class OctreeNode
See Also:
OctreeARnode.maxChainsPerFace()

faceWithMaxChains

public byte faceWithMaxChains()
Overrides:
faceWithMaxChains in class OctreeNode
See Also:
OctreeARnode.faceWithMaxChains()

generateTriangleFans

public byte generateTriangleFans(IsoSurface surface)
Overrides:
generateTriangleFans in class OctreeNode
See Also:
OctreeInternalNode.generateTriangleFans()

toString

public java.lang.String toString()
print out a node's information

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this octree node

print

public void print()
print out a node's private data members

Overrides:
print in class OctreeNode

IsoSurface Rendering of an AR Representation