org.critterai.nmgen
Class ContourSetBuilder

java.lang.Object
  extended by org.critterai.nmgen.ContourSetBuilder

public final class ContourSetBuilder
extends Object

Builds a set of contours from the region information contained by an OpenHeightfield. It does this by locating and "walking" the edges

See Also:
Contour Generation, Contour, ContourSet

Constructor Summary
ContourSetBuilder(ArrayList<IContourAlgorithm> algorithms)
          Contructor
 
Method Summary
 ContourSet build(OpenHeightfield sourceField)
          Generates a contour set from the provided OpenHeightfield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContourSetBuilder

public ContourSetBuilder(ArrayList<IContourAlgorithm> algorithms)
Contructor

Parameters:
algorithms - The post-processing algorithms to apply to the contours.
Method Detail

build

public ContourSet build(OpenHeightfield sourceField)
Generates a contour set from the provided OpenHeightfield

The provided field is expected to contain region information. Behavior is undefined if the provided field is malformed or incomplete.

This operation overwrites the flag fields for all spans in the provided field. So the flags must be saved and restored if they are important.

Parameters:
sourceField - A fully generated field.
Returns:
The contours generated from the field.


Project Home and Source Code

Copyright 2010 Stephen Pratt. All rights reserved. Use is subject to license terms.