|
IsoSurface Rendering of an AR Representation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rlaramee.OctreeARnode
Description: Adaptive Resolution octree nodes have more responsibilities than a "plain" octree node. Conceptually, AR octree nodes represent nodes that occur at a transition in resolution within an isosurface. So, an AR octree node has one or more finer resolution neighbors and this AR node and its finer neighbor(s) share triangle vertices on either this node's edge or face (or both).
Ultimately an IsoSurfaceAdaptive object should be made up of only OctreeARnode objects.
This class contains methods that octree nodes need in order to identify/find and collaborate with their AR neighbors e.g. octree nodes at a different resolution than themselves. One reason we added this class is because the OctreeNode class got too big. At one point, it was over 3,000 lines. Another reason is because this makes for better design and is clearer conceptually.
start date Mon 23 Apr '01
OctreeNode.java
Field Summary | |
private ChainGang |
chainGang
|
private java.util.Vector |
edgeVertexList
|
private java.util.Vector |
facialVertexList
This sharedVertexList is examined when octree nodes on the IsoSurfaceAdaptive list is traversed. |
private OctreeInternalNode |
octreeInternalNode
each AR octree node collaborates with an internal octree node |
Constructor Summary | |
OctreeARnode(OctreeInternalNode octreeInternalNode)
constuctor |
Method Summary | |
boolean |
addEdgeVertex(SharedEdgeVertex newSharedVertex)
We make the OctreeInternalNode.addEdgeVertex() a little bit more sophisticated in that the edge vertices are maintained in edge order . |
boolean |
addFacialVertex(SharedFacialVertex newSharedVertex)
|
void |
addTriangleEdge(TriangleEdge triangleEdge)
This method is called from IsoSurface.addARverticesToNeighbor() |
void |
assembleChainGang()
This method is called from IsoSurfaceAdaptive.processResolution() . |
private byte |
assembleTriangleFan(IsoSurface surface,
Chain chain,
TriangleVertex startVertex,
TriangleVertex farVertex,
TriangleVertex endVertex)
|
private SharedFacialVertex |
createFacialVertex(TriangleVertex vertex,
byte octant,
byte face)
This method is called from OctreeARnode.onCoarseFace() . |
private SharedEdgeVertex |
createSharedVertex(TriangleVertex vertex,
byte octant,
byte direction,
byte edge)
This method is called from OctreeARnode.onCoarseEdge() . |
byte |
faceWithMaxChains()
This method is called from IsoSurfaceAdaptive.processResolution() . |
private Triangle |
findTriangleOnFace(byte face,
boolean[] verticesOnFace)
This method is called from OctreeInternalNode.generateTriangleFans() It identifies if one of an octree node's triangles has an edge on the given face. |
private byte |
generateTriangleFan(IsoSurface surface,
Chain chain,
Triangle triangle,
boolean[] verticesOnFace)
Called from OctreeInternalNode.generateTriangleFans() |
byte |
generateTriangleFans(IsoSurface surface)
This is called from IsoSurfaceAdaptive.processResolution() For each chain that the AR octree node has, a fan of triangles is generated, provided that a matching native triangle is found. |
ChainGang |
getChainGang()
Called from OctreeInternalNode.generateTriangleFans() |
java.util.Vector |
getEdgeVertexList()
|
java.util.Vector |
getFacialVertexList()
|
private OctreeInternalNode |
getInternalNode()
|
private java.util.Vector |
getTriangleList()
|
OctreeNode[] |
mapAdjacentChildrenCoarseToFineDir(OctreeNode node,
byte fromCoarseToFineDir)
Deprecated. -coarser octree nodes do not inspect finer resolution neighbors |
byte |
maxChainsPerFace()
This method is called from IsoSurfaceAdaptive.processResolution() . |
SharedEdgeVertex |
onCoarseEdge(TriangleVertex fineVertex,
byte fineOctant,
byte direction)
This method determines whether or not a triangle vertex lies on the edge of a coarser neighboring octree node. |
SharedFacialVertex |
onCoarseFace(TriangleVertex fineVertex,
byte fineOctant,
byte direction)
Do not think that if a triangle vertex is not on it's coarser neighbors edge, that it must be on it's neighbor's face. |
private void |
setChainGang()
|
boolean |
setEdgeVertexList(java.util.Vector newList)
|
boolean |
setFacialVertexList(java.util.Vector newList)
|
private void |
setInternalNode(OctreeInternalNode oin)
Only internal octree nodes can be AR i.e. |
java.lang.String |
toString()
print out a node's information |
Methods inherited from class java.lang.Object |
|
Field Detail |
private OctreeInternalNode octreeInternalNode
private java.util.Vector facialVertexList
private java.util.Vector edgeVertexList
private ChainGang chainGang
Constructor Detail |
public OctreeARnode(OctreeInternalNode octreeInternalNode)
node
- an octree node that has been identified as an adaptive
resolution nodeMethod Detail |
private void setInternalNode(OctreeInternalNode oin)
an
- internal octree nodeprivate OctreeInternalNode getInternalNode()
public java.util.Vector getEdgeVertexList()
public boolean setEdgeVertexList(java.util.Vector newList)
newList
- a shared EdgeVertexList for this octree nodepublic java.util.Vector getFacialVertexList()
public boolean setFacialVertexList(java.util.Vector newList)
newList
- a shared facialVertexList for this octree nodeprivate java.util.Vector getTriangleList()
public ChainGang getChainGang()
private void setChainGang()
public void assembleChainGang()
public byte maxChainsPerFace()
public byte faceWithMaxChains()
public byte generateTriangleFans(IsoSurface surface)
surface
- a reference to the isosurfaceprivate byte generateTriangleFan(IsoSurface surface, Chain chain, Triangle triangle, boolean[] verticesOnFace)
surface
- a reference to the isosurfacechain
- a chain of triangle edges on the side of an
AR octree node/cubtriangle
- one of this internal octree node's native
trianglesverticesOnFace
- identifies which 2 of the triangle
vertices are on the same face as the given chain.private byte assembleTriangleFan(IsoSurface surface, Chain chain, TriangleVertex startVertex, TriangleVertex farVertex, TriangleVertex endVertex)
surface
- a reference to the isosurfacechain
- a chain of triangle edgesstartVertex
- the coarse triangle vertex that starts the chainfarVertex
- the coarse triangle vertex that is connected to
each triangle in the fanendVertex
- the coarse triangle vertex that ends the chainprivate Triangle findTriangleOnFace(byte face, boolean[] verticesOnFace)
face
- one of 6 faces of a cubeverticesOnFace
- identifies those triangle vertices that lie
on the given facepublic boolean addEdgeVertex(SharedEdgeVertex newSharedVertex)
newSharedVertex
- one to add to the listpublic boolean addFacialVertex(SharedFacialVertex newSharedVertex)
newSharedVertex
- one to add to the listpublic void addTriangleEdge(TriangleEdge triangleEdge)
public SharedEdgeVertex onCoarseEdge(TriangleVertex fineVertex, byte fineOctant, byte direction)
Distinguishing shared edge intersections is going to depend on the calling octree node's octant and direction. There's a figure called, ARnodeIdentifier that is a useful visual aid. It was used in order to write this method. It's in the ~sdb/rlaramee/ARfig directory.
P3_____e2______P2 This is the cube representation /| /| used write the method. e10| e11| It is the same as the VTK's except y P7______e6____P6/ | for the orientation of the ^ | e3 | e1 y,z axes. | | | | | | e7 | e5 | |---> | P0|_____e0__|___|P1 / x | / | / / | e8 | e9 z |/_____e4_____|/ P4 P5
fineVertex
- the finer resolution triangle vertex that may
lie on a neighbor's edgefineOctant
- the octant that the calling finer resolution
octree node neigbor is indirection
- the direction from the finer resolution
node TO the coarser resolution nodeprivate SharedEdgeVertex createSharedVertex(TriangleVertex vertex, byte octant, byte direction, byte edge)
vertex
- the finer resolution triangle vertex that may
lie on a neighbor's edgeoctant
- the octant that the calling finer resolution
octree node neigbor is indirection
- the direction from the finer resolution
node TO the coarser resolution nodeprivate SharedFacialVertex createFacialVertex(TriangleVertex vertex, byte octant, byte face)
vertex
- the finer resolution triangle vertex that may
lie on a neighbor's edgeoctant
- the octant that the calling finer resolution
octree node neigbor is inface
- the face on the coarser node i.e. this
node that has the facial vertexpublic SharedFacialVertex onCoarseFace(TriangleVertex fineVertex, byte fineOctant, byte direction)
Identifying facial intersections is going to depend on the calling octree node's octant and direction. There's a figure called, ARnodeIdentifier that is a useful visual aid. It was used in order to write this method. It's in the ~sdb/rlaramee/ARfig directory.
fineEdge
- the finer resolution neighboring octree node edge
that may befineOctant
- the octant that the calling finer resolution
octree node neigbor is indirection
- the direction from the finer resolution
cube to the coaser resolution neighbor.public OctreeNode[] mapAdjacentChildrenCoarseToFineDir(OctreeNode node, byte fromCoarseToFineDir)
For a given direction, an octreeNode only has 4 face neighbors at a finer resolution. The given direction is the direction from the coarse neigbor to the neighbor with the finer resolution children .
This method was double checked. The long names are a result of how easy it is to get confused writing this method.
fromCoarseToFineDir
- the direction the coarse neighbor is
looking innode
- the octree node calling this methodpublic java.lang.String toString()
toString
in class java.lang.Object
|
IsoSurface Rendering of an AR Representation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |