org.critterai.nmgen
Interface IContourAlgorithm

All Known Implementing Classes:
MatchNullRegionEdges, NullRegionMaxEdge

public interface IContourAlgorithm

Provides for the application of an algorithm to a contour.


Method Summary
 void apply(ArrayList<Integer> sourceVerts, ArrayList<Integer> resultVerts)
          Apply an algorithm to a contour.
 

Method Detail

apply

void apply(ArrayList<Integer> sourceVerts,
           ArrayList<Integer> resultVerts)
Apply an algorithm to a contour.

The implementation is permitted to require that the the result vertices be seeded with existing data. In this case the argument becomes an in/out argument rather than just an out argument.

Parameters:
sourceVerts - The source vertices that represent the contour in the form (x, y, z, regionID).
resultVerts - The contour vertices produced by the operation in the form (x, y, z, sourceIndex).

Source index is the index (not pointer) of the related source vertex in sourcVerts. E.g. If the vertex in resultsList references the vertex at position 12 of sourceVerts, then sourceIndex will be 3 (12 / 4).



Project Home and Source Code

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