|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.j3d.terrain.Landscape
org.j3d.terrain.roam.ROAMSplitMergeLandscape
org.j3d.renderer.java3d.terrain.roam.J3DSplitMergeLandscape
ROAM implmentation of a landscape using the split-merge combination algorithm.
First patch is at 0,0 in x, z and then patches are laid out along the +ve x axis and the -ve z axis
| Field Summary |
| Fields inherited from class org.j3d.terrain.roam.ROAMSplitMergeLandscape |
patchSize |
| Fields inherited from class org.j3d.terrain.Landscape |
landscapeView, terrainData |
| Constructor Summary | |
J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data)
Creates new Landscape based on the view information and the terrain data. |
|
J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data,
AppearanceGenerator gen)
Provide a landscape with a specific appearance generator set. |
|
J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data,
int patchSize)
Creates new Landscape based on the view information and static terrain data, with a controlable patch size. |
|
J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data,
int patchSize,
AppearanceGenerator gen)
Provide a landscape with a specific appearance generator set. |
|
| Method Summary | |
protected void |
addPatch(ROAMPatch patch)
Add the newly created patch to the renderer specific structures. |
protected ROAMPatch |
createPatch(int x,
int y,
int xTile,
int yTile)
Create a new patch object instance that is located at the given position within the tile. |
AppearanceGenerator |
getAppearanceGenerator()
Get the currently set appearance generator. |
javax.media.j3d.BranchGroup |
getSceneGraphObject()
Get the geometry group that this terrain is being rendered to. |
void |
setAppearanceGenerator(AppearanceGenerator gen)
Set the appearance generator to create new appearanace items. |
void |
setView(javax.media.j3d.Transform3D t3d)
Set the current view location information based on a transform matrix. |
void |
transitionEnded(javax.media.j3d.Transform3D t3d)
The transition from one point to another is completed. |
protected void |
updatePatch(ROAMPatch patch,
int xTile,
int yTile)
Update the patch representation to be at the new tile location. |
void |
viewerPositionUpdated(javax.media.j3d.Transform3D t3d)
The frame has just been updated with the latest view information. |
| Methods inherited from class org.j3d.terrain.roam.ROAMSplitMergeLandscape |
initialize, setView |
| Methods inherited from class org.j3d.terrain.Landscape |
getHeight |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data)
view - The view frustum looking at this landscapedata - The raw data for the terrain
java.lang.IllegalArgumentException - The static grid is not n^2 + 1 in size
public J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data,
int patchSize)
view - The view frustum looking at this landscapedata - The raw data for the terrainpatchSize - The number of grid points per patch side, power 2.
java.lang.IllegalArgumentException - The patchSize was < 0 or not a power
of two.
public J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data,
AppearanceGenerator gen)
view - The viewing frustum to see the data withdata - The raw data to viewgen - The generator instance to use
java.lang.IllegalArgumentException - either parameter is null
java.lang.IllegalArgumentException - The patchSize was < 0 or not a power
of two.
public J3DSplitMergeLandscape(ViewFrustum view,
TerrainData data,
int patchSize,
AppearanceGenerator gen)
view - The viewing frustum to see the data withdata - The raw data to viewgen - The generator instance to usepatchSize - The number of grid points per patch side, power 2.
java.lang.IllegalArgumentException - either parameter is null
java.lang.IllegalArgumentException - The patchSize was < 0 or not a power
of two.| Method Detail |
public void transitionEnded(javax.media.j3d.Transform3D t3d)
t3d - The position of the final viewpointpublic void viewerPositionUpdated(javax.media.j3d.Transform3D t3d)
t3d - The position of the viewpoint nowpublic void setView(javax.media.j3d.Transform3D t3d)
org.j3d.ui.navigation package.
setView in interface J3DLandscapet3d - The transform to use as the view positionpublic void setAppearanceGenerator(AppearanceGenerator gen)
setAppearanceGenerator in interface J3DLandscapegen - The new generator instance to usepublic AppearanceGenerator getAppearanceGenerator()
getAppearanceGenerator in interface J3DLandscapepublic javax.media.j3d.BranchGroup getSceneGraphObject()
getSceneGraphObject in interface J3DLandscape
protected ROAMPatch createPatch(int x,
int y,
int xTile,
int yTile)
createPatch in class ROAMSplitMergeLandscapex - The east coordinate of the patchy - The north coordinate of the patchxTile - The tile coordinate of the patch along the X axisyTile - The tile coordinate of the patch along the Y axis
protected void updatePatch(ROAMPatch patch,
int xTile,
int yTile)
updatePatch in class ROAMSplitMergeLandscapepatch - The patch instance to updatexTile - The new tile coordinate of the patch along the X axisyTile - The new tile coordinate of the patch along the Y axisprotected void addPatch(ROAMPatch patch)
addPatch in class ROAMSplitMergeLandscape
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||