IsoSurface Rendering of an AR Representation

rlaramee
Class OctreeInternalNode

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

public class OctreeInternalNode
extends OctreeNode

Description: There is an opportunity to save memory by distinguishing between internal octree nodes and leaf nodes. Internal octree nodes contain:

  1. a pointer to their parent node
  2. a pointer to their sibling node
  3. a pointer to their 0th child
  4. a cube
  5. a list of polygons
  6. their child number
  7. minimum and maximum vertex values

Leaf nodes however, do not need to store all of this information. Leaf nodes eliminate the need to store minimum and maximum (1 float is 4 bytes) vertex values as well as a pointer (4 bytes) to their 0th child. The minimum and maximum vertex values may simply be computed. This represents a savings of 12 bytes for each leaf node. At level 1 there may be up to 262,144 leaf nodes for a potential savings of approximately 3.1 megabytes. Level 0 may consist of up to 2,087,152 leaf nodes for a potential savings of about 25.2 megabytes.

start date Thurs 1 June 00

Version:
1.0
Author:
Robert S Laramee
See Also:

Field Summary
private  OctreeNode childZero
           
private  float maximum
          a double is 8 bytes
private  float minimum
          a float is 4 bytes
private  OctreeARnode octreeARnode
           
 
Fields inherited from class rlaramee.OctreeNode
childNumber, cube, debug, parentNode, processed, siblingNode, triangleList
 
Constructor Summary
OctreeInternalNode(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)
          This method merely calls OctreeARnode.addEdgeVertex(SharedEdgeVertex) .
 boolean addFacialVertex(SharedFacialVertex newSharedVertex)
          This method merely calls OctreeARnode.addFacialVertex(SharedEdgeVertex) .
 void addTriangleEdge(TriangleEdge triangleEdge)
          This method merely calls OctreeARnode.addTriangleEdge(TriangleEdge) .
 void assembleChainGang()
           
 byte deleteTriangles(IsoSurface surface)
          This is called from IsoSurfaceAdaptive.processSubdivide() An octree node has do delete its old coarser triangles before being subdivided.
 byte faceWithMaxChains()
           
private  TriangleVertex findCommonEdge(TriangleVertex coarseVertex)
          Deprecated. -Is this method still being used?
 byte generateTriangleFans(IsoSurface surface)
           
 OctreeARnode getARnode()
           
 OctreeNode getChildZero()
           
 java.util.Vector getEdgeVertexList()
          The following methods are really an interface for collaboration with the adaptive resolution octree node
 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
 void setARnode(OctreeARnode newARnode)
           
 boolean setChildZero(OctreeNode newOctreeNode)
           
 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()
          Deprecated. -this has to be updated in order to search TriangleEdge objects
 
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
 

Field Detail

minimum

private float minimum
a float is 4 bytes

maximum

private float maximum
a double is 8 bytes

childZero

private OctreeNode childZero

octreeARnode

private OctreeARnode octreeARnode
Constructor Detail

OctreeInternalNode

public OctreeInternalNode(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()
Overrides:
getChildZero in class OctreeNode
Returns:
this octree node's 0th child node

setChildZero

public boolean setChildZero(OctreeNode newOctreeNode)
Overrides:
setChildZero in class OctreeNode
Parameters:
this - octree node's 0th child node

getARnode

public OctreeARnode getARnode()
Overrides:
getARnode in class OctreeNode
Returns:
the adaptive resolution octree node that collaborates with this internal octree node

setARnode

public void setARnode(OctreeARnode newARnode)
Parameters:
newARnode - a new adaptive resolution octree node

getEdgeVertexList

public java.util.Vector getEdgeVertexList()
The following methods are really an interface for collaboration with the adaptive resolution octree node
Overrides:
getEdgeVertexList in class OctreeNode
Returns:
this OctreeNode's shared edgeVertexList (which has moved to the AR octree node class

setEdgeVertexList

public boolean setEdgeVertexList(java.util.Vector newList)
Overrides:
setEdgeVertexList in class OctreeNode
Parameters:
newList - a shared EdgeVertexList for this octree node
Returns:
TRUE if the call to set() was successful

getFacialVertexList

public java.util.Vector getFacialVertexList()
Overrides:
getFacialVertexList in class OctreeNode
Returns:
this OctreeNode's shared facialVertexList

setFacialVertexList

public boolean setFacialVertexList(java.util.Vector newList)
Overrides:
setFacialVertexList in class OctreeNode
Parameters:
newList - a shared facialVertexList for this octree node
Returns:
TRUE if the call to set() was successful

addEdgeVertex

public boolean addEdgeVertex(SharedEdgeVertex newSharedVertex)
This method merely calls OctreeARnode.addEdgeVertex(SharedEdgeVertex) .
Overrides:
addEdgeVertex in class OctreeNode

addFacialVertex

public boolean addFacialVertex(SharedFacialVertex newSharedVertex)
This method merely calls OctreeARnode.addFacialVertex(SharedEdgeVertex) .
Overrides:
addFacialVertex in class OctreeNode

addTriangleEdge

public void addTriangleEdge(TriangleEdge triangleEdge)
This method merely calls OctreeARnode.addTriangleEdge(TriangleEdge) .
Overrides:
addTriangleEdge in class OctreeNode
Following copied from class: rlaramee.OctreeNode
See Also:
OctreeInternalNode.addTriangleEdge()

updateEdgeVertices

public boolean updateEdgeVertices()
Deprecated. -this has to be updated in order to search TriangleEdge objects

This method is called from IsoSurfaceAdaptive.processEdgeList() . At the point this method is called
  1. there should be no facial vertices on this node and
  2. no more than 1 shared edge vertex per coarse edge.
Overrides:
updateEdgeVertices in class OctreeNode
Following copied from class: rlaramee.OctreeNode
See Also:
OctreeInternalNode.updateEdgeVertices()

findCommonEdge

private TriangleVertex findCommonEdge(TriangleVertex coarseVertex)
Deprecated. -Is this method still being used?

This method is called from: OctreeInternalNode.updateEdgeVertices()

Parameters:
coarseVertex - the vertex we may update if we find a shared edge vertex on the same edge
Returns:
triangleVertex the shared edge vertex on the same edge

deleteTriangles

public byte deleteTriangles(IsoSurface surface)
This is called from IsoSurfaceAdaptive.processSubdivide() An octree node has do delete its old coarser triangles before being subdivided.

Overrides:
deleteTriangles in class OctreeNode
Parameters:
surface - a reference to the isosurface
Returns:
the number of triangles deleted from the isosurface

onCoarseEdge

public SharedEdgeVertex onCoarseEdge(TriangleVertex fineVertex,
                                     byte fineOctant,
                                     byte direction)
Overrides:
onCoarseEdge in class OctreeNode
See Also:
OctreeARnode class. These methods are just an interface to the AR node.

onCoarseFace

public SharedFacialVertex onCoarseFace(TriangleVertex fineVertex,
                                       byte fineOctant,
                                       byte direction)
Overrides:
onCoarseFace in class OctreeNode
Following copied from class: rlaramee.OctreeNode
See Also:
OctreeInternalNode.onCoarseFace()

assembleChainGang

public void assembleChainGang()
Overrides:
assembleChainGang in class OctreeNode
Following copied from class: rlaramee.OctreeNode
See Also:
OctreeARnode class for the implementation of these methods

maxChainsPerFace

public byte maxChainsPerFace()
Overrides:
maxChainsPerFace in class OctreeNode

faceWithMaxChains

public byte faceWithMaxChains()
Overrides:
faceWithMaxChains in class OctreeNode

generateTriangleFans

public byte generateTriangleFans(IsoSurface surface)
Overrides:
generateTriangleFans in class OctreeNode

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