org.odejava
Class GeomTerrain
java.lang.Object
org.odejava.Geom
org.odejava.GeomTerrain
public class GeomTerrain
- extends Geom
Terrain is an infinite ground based on a height map. It is an contrib
module. Contributed by Benoit Chaperot, www.jstarlab.com
This module is currently disabled.
Drawing related routines made by William Denniss, these routines are under
development.
Created 16.12.2003 (dd.mm.yyyy)
- Author:
- Jani Laakso E-mail: jani.laakso@itmill.com, William Denniss
see http://odejava.dev.java.net
|
Constructor Summary |
GeomTerrain(float[] pHeights,
float vLength,
int numNodesPerSide)
|
GeomTerrain(String name,
float[] pHeights,
float vLength,
int numNodesPerSide)
Create terrain geometry to specific space. |
|
Method Summary |
static org.openmali.vecmath2.Point3f[] |
dsDrawTerrain(float x,
float y,
float vLength,
float vNodeLength,
int nNumNodesPerSide,
float[] pHeights)
Returns a coordinate array representing this terrain object. |
org.openmali.vecmath2.Point3f[] |
getGeometry()
|
org.openmali.vecmath2.Point3f[] |
getGeometry(float x,
float y,
float vLength)
|
int |
getNumNodesPerSide()
|
float[] |
getPHeights()
|
float |
getVLength()
|
| Methods inherited from class org.odejava.Geom |
addToSpace, delete, finalize, getGeomFromNativeAddr, getId, getID, getName, getNativeAddr, getUserData, isEnabled, removeFromSpace, setCategoryBits, setCollideBits, setEnabled, setName, setUserData, updateNativeAddr |
GeomTerrain
public GeomTerrain(String name,
float[] pHeights,
float vLength,
int numNodesPerSide)
- Create terrain geometry to specific space. Terrain is unmovable.
This module is currently disabled.
- Parameters:
name - pHeights - vLength - numNodesPerSide -
GeomTerrain
public GeomTerrain(float[] pHeights,
float vLength,
int numNodesPerSide)
getNumNodesPerSide
public int getNumNodesPerSide()
- Returns:
- Returns the numNodesPerSide.
getPHeights
public float[] getPHeights()
- Returns:
- Returns the pHeights.
getVLength
public float getVLength()
- Returns:
- Returns the vLength.
getGeometry
public org.openmali.vecmath2.Point3f[] getGeometry()
getGeometry
public org.openmali.vecmath2.Point3f[] getGeometry(float x,
float y,
float vLength)
dsDrawTerrain
public static org.openmali.vecmath2.Point3f[] dsDrawTerrain(float x,
float y,
float vLength,
float vNodeLength,
int nNumNodesPerSide,
float[] pHeights)
- Returns a coordinate array representing this terrain object. This can
then be used to generate geometry for example using Xith3D. The geometry
is not indexed.
- Parameters:
x - Amount which the terrain will be offset along the x axisy - Amount which the terrain will be offset along the y axisvLength - Offset multiplier (the x and y offset is multiplied by this
amount), if in doubt set to 1vNodeLength - distance between each vertexnNumNodesPerSide - number of vertexes per sidepHeights - heightmap array. The length of this array must be equal to
nNumNodesPerSide squared
- Returns:
- a coordinate array representing this terrain object