Class ContourSet

  extended by org.critterai.nmgen.BoundedField
      extended by org.critterai.nmgen.ContourSet

public final class ContourSet
extends BoundedField

Represents a set of related contours (simple polygons) within a bounded field.

The contours may be connected (share edges), but are expected to not intersect.

See Also:

Method Summary
 void add(Contour contour)
          Add a contour to the set.
 Contour get(int index)
          Gets the contour specified by the index.
 int size()
          The number of contours in the set.
Methods inherited from class org.critterai.nmgen.BoundedField
boundsMax, boundsMin, cellHeight, cellSize, depth, getDirOffsetDepth, getDirOffsetWidth, gridIndex, isInBounds, overlaps, resetBounds, resetCellInfo, setBounds, setBounds, setBoundsMax, setBoundsMin, setCellHeight, setCellSize, width
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public void add(Contour contour)
Add a contour to the set.

Behavior is undefined if the contour argument is null.

contour - The contour to add to the set.


public Contour get(int index)
Gets the contour specified by the index.

index - The index of the contour to retrieve.
The contour for the specified index, or null if the index is invalid.


public int size()
The number of contours in the set.

The number of contours in the set.

Project Home and Source Code

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