|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.terrain.Landscape org.j3d.terrain.roam.ROAMSplitMergeLandscape
public abstract class ROAMSplitMergeLandscape
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
Internationalisation Resource Names
Field Summary | |
---|---|
protected int |
patchSize
The patch size to use for this landscape |
Fields inherited from class org.j3d.terrain.Landscape |
---|
landscapeView, terrainData |
Constructor Summary | |
---|---|
ROAMSplitMergeLandscape(ViewFrustum view,
TerrainData data)
Creates new Landscape based on the view information and the terrain data. |
|
ROAMSplitMergeLandscape(ViewFrustum view,
TerrainData data,
int patchSize)
Creates new Landscape based on the view information and static terrain data, with a controlable patch size. |
Method Summary | |
---|---|
protected abstract void |
addPatch(ROAMPatch patch)
Add the newly created patch to the renderer specific structures. |
protected abstract ROAMPatch |
createPatch(int eastPosition,
int northPosition,
int xTile,
int yTile)
Create a new patch object instance that is located at the given position within the tile. |
void |
initialize(javax.vecmath.Tuple3f position,
javax.vecmath.Vector3f direction)
Initialise the landscape ready for viewing. |
void |
setView(javax.vecmath.Tuple3f position,
javax.vecmath.Vector3f direction)
Change the view of the landscape. |
protected abstract void |
updatePatch(ROAMPatch patch,
int xTile,
int yTile)
Update the patch representation to be at the new tile location. |
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 |
Field Detail |
---|
protected final int patchSize
Constructor Detail |
---|
public ROAMSplitMergeLandscape(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 sizepublic ROAMSplitMergeLandscape(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.Method Detail |
---|
public void initialize(javax.vecmath.Tuple3f position, javax.vecmath.Vector3f direction)
initialize
in class Landscape
position
- The position the user is in the virtual worlddirection
- The orientation of the user's gazepublic void setView(javax.vecmath.Tuple3f position, javax.vecmath.Vector3f direction)
setView
in class Landscape
position
- The position of the cameradirection
- The direction the camera is lookingprotected abstract ROAMPatch createPatch(int eastPosition, int northPosition, int xTile, int yTile)
eastPosition
- The east coordinate of the patchnorthPosition
- 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 axisprotected abstract void updatePatch(ROAMPatch patch, int xTile, int yTile)
patch
- 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 abstract void addPatch(ROAMPatch patch)
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |