Class TriangleCollector


  • public final class TriangleCollector
    extends Object
    Provides a utility for collecting triangles from a TIN.
    • Method Detail

      • visitTrianglesConstrained

        public static void visitTrianglesConstrained​(IIncrementalTin tin,
                                                     Consumer<Vertex[]> consumer)
        Traverses the TIN, visiting all triangles that are members of a constrained region. As triangles are identified, this method calls the accept method of a consumer. If the TIN has not been bootstrapped, this routine exits without further processing.

        All triangles produced by this method are valid (non-ghost) triangles with valid, non-null vertices.

        Note: If no region-based constraints have been added to the Delaunay triangulation, then none of the triangles in the TIN are treated as being constrained. This method will exit without further processing.

        Parameters:
        tin - a valid instance
        consumer - an application-specific consumer.
      • visitTrianglesForConstrainedRegion

        public static void visitTrianglesForConstrainedRegion​(IConstraint constraint,
                                                              Consumer<Vertex[]> consumer)
        Traverses the interior of a constrained region, visiting the triangles in its interior. As triangles are identified, this method calls the accept method of a consumer.
        Parameters:
        constraint - a valid instance defining a constrained region that has been added to a TIN.
        consumer - an application-specific consumer.
      • visitTriangles

        public static void visitTriangles​(IIncrementalTin tin,
                                          Consumer<Vertex[]> consumer)
        Identify all valid triangles in the specified TIN and provide them to the application-supplied Consumer. Triangles are provided as an array of three vertices given in clockwise order. If the TIN has not been bootstrapped, this routine exits without further processing. This routine will not call the accept method for "ghost" triangles (those triangles that include the ghost vertex).
        Parameters:
        tin - a valid TIN
        consumer - a valid consumer.
      • visitSimpleTriangles

        public static void visitSimpleTriangles​(IIncrementalTin tin,
                                                Consumer<SimpleTriangle> consumer)
        Identify all valid triangles in the specified TIN and provide them to the application-supplied Consumer. Triangles are provided as instances of the SimpleTriangle class. If the TIN has not been bootstrapped, this routine exits without further processing. This routine will not call the accept method for "ghost" triangles (those triangles that include the ghost vertex).
        Parameters:
        tin - a valid TIN
        consumer - a valid consumer.