org.osm2world.viewer.view.debug
Class DebugView

Object
  extended by DebugView
All Implemented Interfaces:
RenderableToJOGL, Renderable
Direct Known Subclasses:
ClearingDebugView, EleDebugView, HelpView, MapDataBoundsDebugView, MapDataDebugView, MapDataElevationDebugView, NetworkDebugView, OrthoBoundsDebugView, QuadtreeDebugView, RoofDataDebugView, TerrainAABBDebugView, TerrainBoundaryAABBDebugView, TerrainBoundaryDebugView, TerrainCellLabelsView, TerrainElevationGridDebugView, TerrainNormalsDebugView, TerrainOutlineDebugView, TerrainView, TriangulationDebugView, WorldObjectNormalsDebugView, WorldObjectView

public abstract class DebugView
extends Object
implements RenderableToJOGL

contains some common methods for debug views


Field Summary
protected  CellularTerrainElevation eleData
           
protected  MapData map
           
protected  PrimitiveBuffer mapDataPrimitiveBuffer
           
protected  Terrain terrain
           
protected  PrimitiveBuffer terrainPrimitiveBuffer
           
 
Constructor Summary
DebugView()
           
 
Method Summary
 boolean canBeUsed()
          returns true if this DebugView can currently be used for rendering.
protected static void drawBox(JOGLTarget target, Color color, VectorXYZ v1, VectorXYZ v2, VectorXYZ v3, VectorXYZ v4)
           
protected static void drawBoxAround(JOGLTarget target, VectorXYZ center, Color color, float halfWidth)
           
protected static void drawBoxAround(JOGLTarget target, VectorXZ center, Color color, float halfWidth)
           
 String getDescription()
          returns a description of the debug view
 void renderTo(GL gl, Camera camera)
           
protected abstract  void renderToImpl(GL gl, Camera camera)
          implementation for the renderTo method, provided by subclasses.
 void setConversionResults(ConversionFacade.Results conversionResults)
           
 void setPrimitiveBuffers(PrimitiveBuffer mapDataPrimitiveBuffer, PrimitiveBuffer terrainPrimitiveBuffer)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected MapData map

terrain

protected Terrain terrain

eleData

protected CellularTerrainElevation eleData

mapDataPrimitiveBuffer

protected PrimitiveBuffer mapDataPrimitiveBuffer

terrainPrimitiveBuffer

protected PrimitiveBuffer terrainPrimitiveBuffer
Constructor Detail

DebugView

public DebugView()
Method Detail

setConversionResults

public void setConversionResults(ConversionFacade.Results conversionResults)

setPrimitiveBuffers

public void setPrimitiveBuffers(PrimitiveBuffer mapDataPrimitiveBuffer,
                                PrimitiveBuffer terrainPrimitiveBuffer)

canBeUsed

public boolean canBeUsed()
returns true if this DebugView can currently be used for rendering. By default, this checks whether all the setters have been used with non-null values, but subclasses can overwrite it with their own checks.


getDescription

public String getDescription()
returns a description of the debug view


renderTo

public void renderTo(GL gl,
                     Camera camera)
Specified by:
renderTo in interface RenderableToJOGL

renderToImpl

protected abstract void renderToImpl(GL gl,
                                     Camera camera)
implementation for the renderTo method, provided by subclasses. Will only be called if the DebugView canBeUsed().


drawBoxAround

protected static final void drawBoxAround(JOGLTarget target,
                                          VectorXZ center,
                                          Color color,
                                          float halfWidth)

drawBoxAround

protected static final void drawBoxAround(JOGLTarget target,
                                          VectorXYZ center,
                                          Color color,
                                          float halfWidth)

drawBox

protected static final void drawBox(JOGLTarget target,
                                    Color color,
                                    VectorXYZ v1,
                                    VectorXYZ v2,
                                    VectorXYZ v3,
                                    VectorXYZ v4)