|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.critterai.nmgen.FilterOutSmallRegions
public final class FilterOutSmallRegions
Removes and merges small regions within a height field.
Applies two algorithms:
Constructor Summary | |
---|---|
FilterOutSmallRegions(int minUnconnectedRegionSize,
int mergeRegionSize)
Constructor |
Method Summary | |
---|---|
void |
apply(OpenHeightfield field)
Applies the algorithm to the height field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterOutSmallRegions(int minUnconnectedRegionSize, int mergeRegionSize)
minUnconnectedRegionSize
- The minimum region size for
unconnected (island) regions. (Voxels)
Any generated regions that are not connected to any other region and are smaller than this size will be culled before final navmesh generation. I.e. No longer considered traversable.
Constraints: > 0
mergeRegionSize
- Any regions smaller than this size will,
if possible, be merged with larger regions. (Voxels)
Helps reduce the number of unnecessarily small regions that can be formed. This is especially an issue in diagonal path regions where inherent faults in the region generation algorithm can result in unnecessarily small regions.
If a region cannot be legally merged with a neighbor region, then it will be left alone.
Constraints: >= 0
Method Detail |
---|
public void apply(OpenHeightfield field)
The height field must contain valid region information in order for this algorithm to be effective.
apply
in interface IOpenHeightFieldAlgorithm
field
- The field to apply the algorithm to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2010 Stephen Pratt. All rights reserved. Use is subject to license terms.