Package worldBuilder
Class TopoMap
- java.lang.Object
-
- worldBuilder.TopoMap
-
public class TopoMap extends java.lang.Object
a class to render a set of mesh points as a traditional topographic map image.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
paint(java.awt.Graphics g, int width, int height, int cellWidth)
Render current mesh as a topographic map
-
-
-
Constructor Detail
-
TopoMap
public TopoMap(Map map)
instantiate a (topographic lines) height map renderer- Parameters:
map
- to be rendered
-
-
Method Detail
-
paint
public void paint(java.awt.Graphics g, int width, int height, int cellWidth)
Render current mesh as a topographic map- Parameters:
g
- Graphics contextwidth
- of the display mapheight
- of the display mapcellWidth
- - pixels per cell This method uses the Marching Squares algorithm. for each topo line construct an over/under 2D bitmap march through the bitmap, summing neighbors use sum of neighbors to select an image
-
-