org.osm2world.core.terrain.data
Class Terrain

Object
  extended by Terrain
All Implemented Interfaces:
RenderableToPOVRay, Renderable, RenderableToAllTargets

public class Terrain
extends Object
implements RenderableToAllTargets, RenderableToPOVRay

Terrain data created from a MapData and TerrainElevation data. Terrain consists of TerrainPatches that fill the gaps between representations of elements providing terrain boundary information.


Constructor Summary
Terrain(Collection<TerrainPatch> patches)
           
 
Method Summary
 void addDeclarationsTo(POVRayTarget target)
          lets the Renderable add global declarations.
 Collection<TerrainPatch> getPatches()
          returns the patches making up the entire terrain.
 Collection<TriangleXYZ> getTriangulation()
           
 void renderTo(POVRayTarget target)
           
 void renderTo(Target<?> target)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Terrain

public Terrain(Collection<TerrainPatch> patches)
Method Detail

getPatches

public Collection<TerrainPatch> getPatches()
returns the patches making up the entire terrain. Needn't be used directly for rendering (rendering the Terrain renders all the patches), but is required e.g. for debugging.


getTriangulation

public Collection<TriangleXYZ> getTriangulation()

renderTo

public void renderTo(Target<?> target)
Specified by:
renderTo in interface RenderableToAllTargets

addDeclarationsTo

public void addDeclarationsTo(POVRayTarget target)
Description copied from interface: RenderableToPOVRay
lets the Renderable add global declarations. This is called before the renderTo calls.

Specified by:
addDeclarationsTo in interface RenderableToPOVRay

renderTo

public void renderTo(POVRayTarget target)
Specified by:
renderTo in interface RenderableToPOVRay