|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Group javax.media.j3d.TransformGroup edu.d.umn.geometry.LODSegment
public class LODSegment
LOD segment is based on a TransformGroup. Each LODSegment is actually comprised of three ElevationSegments, each created with a different resolution. Switch and DistanceLOD objects are used to determine which of the three to render (based on how far away it is from the viewing platform). This speeds up rendering and allows real-time fly throughs of the scene.
Field Summary |
---|
Fields inherited from class javax.media.j3d.TransformGroup |
---|
ALLOW_TRANSFORM_READ, ALLOW_TRANSFORM_WRITE |
Fields inherited from class javax.media.j3d.Group |
---|
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE |
Fields inherited from class javax.media.j3d.Node |
---|
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary | |
---|---|
LODSegment(int[][] elevations,
int startRow,
int startColumn,
int stopRow,
int stopColumn,
int minEl,
int maxEl,
float exageration,
float minX,
float maxX,
float minZ,
float maxZ,
float modelWidth,
float modelLength)
Constructor is for creating the series of objects that allow level of detail based on distance displays. |
Method Summary | |
---|---|
void |
changeExageration(float oldAmount,
float newAmount)
Loops through the ElevationSegments and calls their changeExageration method. |
float |
getElevationAt(float x,
float z)
Fetches the elevation at a particular location on the terrain map given the x,z coordinates. |
ElevationSegment |
getSegment(int i)
retrieves an elevation segment object |
void |
recalcNormals()
Recalculates the normal values so that the lighting effects change when the elevation exageration change. |
void |
setColor(java.awt.Color color)
|
void |
setTexture(javax.media.j3d.Texture2D tex)
Loops through the ElevationSegments and calls their setTexture method. |
void |
stitchRight(LODSegment other)
stitch right of this segment to left of other segment, stitching consists of averaging the normals on the common boundary vertices between segments. |
void |
stitchTop(LODSegment other)
stitch top of this segment to bottom of other segment, stitching consists of averaging the normals on the common boundary vertices between segments. |
Methods inherited from class javax.media.j3d.TransformGroup |
---|
cloneNode, getTransform, setTransform |
Methods inherited from class javax.media.j3d.Group |
---|
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds |
Methods inherited from class javax.media.j3d.Node |
---|
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
---|
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LODSegment(int[][] elevations, int startRow, int startColumn, int stopRow, int stopColumn, int minEl, int maxEl, float exageration, float minX, float maxX, float minZ, float maxZ, float modelWidth, float modelLength)
modelWidth
- The width of the ElevationModel to which this segment belongs.modelLength
- The length of the ElevationModel to which this segment belongs.elevations
- two dimensional array of terrain elevation data in metersstartRow
- first row of data to use from elevationsstartColumn
- first column of data to use from elevationsstopRow
- last row of data to use from elevationsstopColumn
- last column of data to use from elevationsminEl
- minimum elevation in elevationsmaxEl
- maximum elevation in elevationsexageration
- amount to exagerate(multiply) elevations byminX
- starting x coordinate in metersmaxX
- stopping x coordinate in metersminZ
- starting z coordinate in metersmaxZ
- stopping z coordinate in metersMethod Detail |
---|
public ElevationSegment getSegment(int i)
i
- index of the segment desired
public void stitchRight(LODSegment other)
other
- reference to the segment to the right of this onepublic void stitchTop(LODSegment other)
other
- reference to the segment to the right of this onepublic float getElevationAt(float x, float z)
x
- x coordinatez
- z coordinate
public void setTexture(javax.media.j3d.Texture2D tex)
tex
- The new texture to apply.public void changeExageration(float oldAmount, float newAmount)
oldAmount
- The old exageration value. Used to reset to natural exageration.newAmount
- The desired exageration amount.public void recalcNormals()
public void setColor(java.awt.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |