|
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.Vertex | +--rlaramee.TriangleVertex
Description: A Cube is made up of 8 vertices. Including a vertex class in the design allows flexibility in implementation.
start date Tue 27 April 1999
Cube.java
Field Summary | |
protected float |
error
This data member stores the error associated with the vertex. |
protected short |
resolution
This is used so that coarser resolution vertices do not update finer resolution vertices by accident. |
Constructor Summary | |
TriangleVertex(float[] coordinates,
byte nativeEdge)
Use this constructor when deriving a new cube. |
Method Summary | |
float |
fromBlockSpaceToVisAD(float coordinate,
int dimension)
Transform this vertex coordininates to NDC space We divide the x,y,z coordinates to normalize them. |
float |
getError()
|
byte |
getNativeEdge(Cube cube)
This method is called from: OctreeInternalNode.findCommonEdge() TriangleVertex.onFace() IsoXvertex.toString() IsoYvertex.toString() IsoZvertex.toString() OctreeNode.getEdgeVerticesOfCoarserNeighbor() It's used to resolve inconsistent interpolation and identify triangle vertices on the same face. |
private int |
getNumSharedPolygons()
|
int[] |
getPolygonList()
polygonList is a list of polygon indices (indices into the list of polygons e.g. |
protected short |
getResolution()
|
float |
getXcoord()
This method must be over-ridden by IsoXvertex, IsoYvertex, and IsoZvertex. |
float |
getYcoord()
This method must be over-ridden by IsoXvertex, IsoYvertex, and IsoZvertex. |
float |
getZcoord()
This method must be over-ridden by IsoXvertex, IsoYvertex, and IsoZvertex. |
boolean |
isValid()
An error check methed, there is no check on a triangles' scalar value because the scalar value of a triangle is associated with an isosurface. |
void |
oldSetPolygonList(int polygonNumber)
Deprecated. -use the setPolygonList() method |
boolean |
onFace(Cube cube,
byte face)
|
void |
setError(float newError)
|
protected void |
setNativeEdge(byte edge)
Deprecated. the native edge is computed now, not stored |
private boolean |
setNumSharedPolygons()
|
void |
setPolygonList(int polygonNumber)
The 8th index of the polygonList for each vertex hold the total number of polygons sharing the vertex. |
protected void |
setResolution(short newRes)
|
void |
setXcoord(float newX)
This method must be over-ridden by IsoXvertex, IsoYvertex, and IsoZvertex. |
void |
setYcoord(float newX)
This method must be over-ridden by IsoXvertex, IsoYvertex, and IsoZvertex. |
void |
setZcoord(float newX)
This method must be over-ridden by IsoXvertex, IsoYvertex, and IsoZvertex. |
boolean |
sharedXaxis(CubeVertex cubeVertex)
Called from OctreeARnode.onCoarseEdge() |
boolean |
sharedYaxis(CubeVertex cubeVertex)
Called from OctreeARnode.onCoarseEdge() |
boolean |
sharedZaxis(CubeVertex cubeVertex)
Called from OctreeARnode.onCoarseEdge() |
java.lang.String |
toString(Cube cube)
|
boolean |
updateWith(TriangleVertex newVertex)
This is called from OctreeInternalNode.processEdgeList() . |
Methods inherited from class rlaramee.Vertex |
isEqual |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected float error
protected short resolution
Constructor Detail |
public TriangleVertex(float[] coordinates, byte nativeEdge)
coordinates
- the x, y, and z coordinates of this TriangleVertex
The 4th coordinate is the error value of the vertexnativeEdge
- the native cube edge that this vertex lies onMethod Detail |
public void setError(float newError)
the
- error value for this triangle vertex.public float getError()
public float getXcoord()
getXcoord
in class Vertex
public float getYcoord()
getYcoord
in class Vertex
public float getZcoord()
getZcoord
in class Vertex
public void setXcoord(float newX)
setXcoord
in class Vertex
newX
- the x coordinate of this TriangleVertexpublic void setYcoord(float newX)
setYcoord
in class Vertex
newY
- the Y coordinate of this TriangleVertexpublic void setZcoord(float newX)
setZcoord
in class Vertex
newZ
- the Z coordinate of this TriangleVertexprivate int getNumSharedPolygons()
private boolean setNumSharedPolygons()
the
- number of polygons that share this TriangleVertex
objectpublic byte getNativeEdge(Cube cube)
This is actually a tricky procedure because triangle vertices are shared between triangles. When a new triangle vertex is computed, the TriangleVertexList object is searched to see if that vertex is already on the list (since 1 vertex may belong to more than 1 triangle). However, the triangles that share the vertex do not have to be in the same cube. Therefore, in order to return the proper native edge we have to examine the cube that is making the query (calling this method). Because the native edge that the triangle vertex is on depends on the cube (the same vertex is on more than one cube edge!).
Native refers to the cube that originally generated the triangle vertex. It is only important in the AR algorithm not the MR algorithm.
cube
- the octree node/cube that is querying to find out
which native edge this triangle vertex is onprotected void setNativeEdge(byte edge)
the
- native cube edge that this vertex lies onprotected short getResolution()
protected void setResolution(short newRes)
the
- resolution of this triangle vertexpublic boolean onFace(Cube cube, byte face)
cube
- the cube/octree node that would like to know which
on what face this vertex is onface
- 1 of 6 cube/octree node facespublic boolean sharedXaxis(CubeVertex cubeVertex)
cubeVertex
- a cube vertexpublic boolean sharedYaxis(CubeVertex cubeVertex)
cubeVertex
- a cube vertexpublic boolean sharedZaxis(CubeVertex cubeVertex)
cubeVertex
- a cube vertexpublic int[] getPolygonList()
public int[] getPolygonList() { return polygonList; }
public void setPolygonList(int polygonNumber)
polygonNumber
- the number of the polygon that this
TriangleVertex belongs toopublic void oldSetPolygonList(int polygonNumber)
polygonNumber
- the number of the polygon that this
TriangleVertex belongs toopublic boolean updateWith(TriangleVertex newVertex)
We make sure not to update a finer resolution vertex with a coarser resolution vertex.
newVertex
- a new vertex whose values are replacing thispublic float fromBlockSpaceToVisAD(float coordinate, int dimension)
In general, the coordinates of shapes should be centered around the origin (0.0f, 0.0f, 0.0f) and scaled appropriately relative to the "box" dimensions.
coordinate
- the coordinate to transformdimension
- the dimension, either x, y, or z along which to
transform the coordinatepublic boolean isValid()
public java.lang.String toString(Cube cube)
cube
- the cube that this triangle vertex belongs to
|
IsoSurface Rendering of an AR Representation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |