vtkStreamingTessellator

Section: Visualization Toolkit Graphics Classes

Usage

This class is a simple algorithm that takes a single starting simplex -- a tetrahedron, triangle, or line segment -- and calls a function you pass it with (possibly many times) tetrahedra, triangles, or lines adaptively sampled from the one you specified. It uses an algorithm you specify to control the level of adaptivity.

This class does not create vtkUnstructuredGrid output because it is intended for use in mappers as well as filters. Instead, it calls the registered function with simplices as they are created.

The subdivision algorithm should change the vertex coordinates (it must change both geometric and, if desired, parametric coordinates) of the midpoint. These coordinates need not be changed unless the EvaluateEdge() member returns true. The vtkStreamingTessellator itself has no way of creating a more accurate midpoint vertex.

Here's how to use this class: - Call AdaptivelySample1Facet, AdaptivelySample2Facet, or AdaptivelySample3Facet, with an edge, triangle, or tetrahedron you want tessellated. - The adaptive tessellator classifies each edge by passing the midpoint values to the vtkEdgeSubdivisionCriterion. - After each edge is classified, the tessellator subdivides edges as required until the subdivision criterion is satisfied or the maximum subdivision depth has been reached. - Edges, triangles, or tetrahedra connecting the vertices generated by the subdivision algorithm are processed by calling the user-defined callback functions (set with SetTetrahedronCallback(), SetTriangleCallback(), or SetEdgeCallback() ).

.SECTION Warning Note that the vertices passed to AdaptivelySample3Facet, AdaptivelySample2Facet, or AdaptivelySample1Facet must be at least 6, 5, or 4 entries long, respectively! This is because the <r,s,t>, <r,s>, or <r> parametric coordinates of the vertices are maintained as the facet is subdivided. This information is often required by the subdivision algorithm in order to compute an error metric. You may change the number of parametric coordinates associated with each vertex using vtkStreamingTessellator::SetEmbeddingDimension().

.SECTION Interpolating Field Values If you wish, you may also use \p vtkStreamingTessellator to interpolate field values at newly created vertices. Interpolated field values are stored just beyond the parametric coordinates associated with a vertex. They will always be \p double values; it does not make sense to interpolate a boolean or string value and your output and subdivision subroutines may always cast to a \p float or use \p floor() to truncate an interpolated value to an integer.

To create an instance of class vtkStreamingTessellator, simply invoke its constructor as follows

  obj = vtkStreamingTessellator

Methods

The class vtkStreamingTessellator has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkStreamingTessellator class.