- Category: Knowledge Base
- Published on 02 October 2012
- Written by openscenegraph
- Hits: 961
A Delaunay Constraint (DC) is a class for defining some edges which must be retained in a delaunay triangulation.
DC is derived from Geometry, so it can consist of one or more LINE_STRIPs or LINE_LOOPs. The final triangulation will include these lines as edges in the triangulated mesh.
Utility functions allow the triangles inside the DC to be deleted (actually the triangles are moved to the DC) - this allows holes to be formed in the terrain. You can then take the triangles in the DC and create a new Geometry which will replace the terrain area, perhaps with a different texture (for example replace a lake area with a water texture in a general terrain).
Or you can derive from DC to make your own geometry replacement method - I have created a 'forest' generator where the forest geometry is formed by raising the removed polygons (by the height of the forest) and building a wall around the edge of the forest (and using sensible textures of course).
Other uses: roads railways rivers fields house with a garden around it. .....