FreeMat
|
Section: Visualization Toolkit Graphics Classes
Descendants of this abstract class are used to decide whether a piecewise linear approximation (triangles, lines, ... ) to some nonlinear geometry should be subdivided. This decision may be based on an absolute error metric (chord error) or on some view-dependent metric (chord error compared to device resolution) or on some abstract metric (color error). Or anything else, really. Just so long as you implement the EvaluateEdge member, all will be well.
To create an instance of class vtkEdgeSubdivisionCriterion, simply invoke its constructor as follows
obj = vtkEdgeSubdivisionCriterion
The class vtkEdgeSubdivisionCriterion 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 vtkEdgeSubdivisionCriterion class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkEdgeSubdivisionCriterion = obj.NewInstance ()
vtkEdgeSubdivisionCriterion = obj.SafeDownCast (vtkObject o)
bool = obj.EvaluateEdge (double p0, double p1, double p2, int field_start)
- You must implement this member function in a subclass. It will be called by vtkStreamingTessellator
for each edge in each primitive that vtkStreamingTessellator generates. int = obj.PassField (int sourceId, int sourceSize, vtkStreamingTessellator t)
- This is a helper routine called by PassFields()
which you may also call directly; it adds sourceSize to the size of the output vertex field values. The offset of the sourceId field in the output vertex array is returned. -1 is returned if sourceSize would force the output to have more than vtkStreamingTessellator::MaxFieldSize field values per vertex. obj.ResetFieldList ()
- Don't pass any field values in the vertex pointer. This is used to reset the list of fields to pass after a successful run of vtkStreamingTessellator. bool = obj.DontPassField (int sourceId, vtkStreamingTessellator t)
- This does the opposite of PassField()
; it removes a field from the output (assuming the field was set to be passed). Returns true if any action was taken, false otherwise. int = obj.GetOutputField (int fieldId) const
- Return the output ID of an input field. Returns -1 if fieldId is not set to be passed to the output. int = obj.GetNumberOfFields () const
- Return the number of fields being evaluated at each output vertex. This is the length of the arrays returned by GetFieldIds()
and GetFieldOffsets()
.