public abstract class ROAMSplitMergeLandscape extends Landscape
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
| Modifier and Type | Field and Description |
|---|---|
protected int |
patchSize
The patch size to use for this landscape
|
landscapeView, terrainData| Constructor and Description |
|---|
ROAMSplitMergeLandscape(org.j3d.util.frustum.ViewFrustum view,
TerrainData data)
Creates new Landscape based on the view information and the terrain
data.
|
ROAMSplitMergeLandscape(org.j3d.util.frustum.ViewFrustum view,
TerrainData data,
int patchSize)
Creates new Landscape based on the view information and static terrain
data, with a controlable patch size.
|
| Modifier and Type | Method and Description |
|---|---|
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(org.j3d.maths.vector.Point3d position,
org.j3d.maths.vector.Vector3d direction)
Initialise the landscape ready for viewing.
|
void |
setView(org.j3d.maths.vector.Point3d position,
org.j3d.maths.vector.Vector3d 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.
|
public ROAMSplitMergeLandscape(org.j3d.util.frustum.ViewFrustum view,
TerrainData data)
view - The view frustum looking at this landscapedata - The raw data for the terrainIllegalArgumentException - The static grid is not n^2 + 1 in sizepublic ROAMSplitMergeLandscape(org.j3d.util.frustum.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.IllegalArgumentException - The patchSize was < 0 or not a power
of two.public void initialize(org.j3d.maths.vector.Point3d position,
org.j3d.maths.vector.Vector3d direction)
initialize in class Landscapeposition - The position the user is in the virtual worlddirection - The orientation of the user's gazepublic void setView(org.j3d.maths.vector.Point3d position,
org.j3d.maths.vector.Vector3d direction)
protected 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)
Copyright © 2001 - 2015 j3d.org