VTK  9.1.0
vtkEdgeSubdivisionCriterion.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkEdgeSubdivisionCriterion.h
5 Language: C++
6
7 Copyright 2003 Sandia Corporation.
8 Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 license for use of this work by or on behalf of the
10 U.S. Government. Redistribution and use in source and binary forms, with
11 or without modification, are permitted provided that this Notice and any
12 statement of authorship are reproduced on all copies.
13
14=========================================================================*/
15#ifndef vtkEdgeSubdivisionCriterion_h
16#define vtkEdgeSubdivisionCriterion_h
36#include "vtkFiltersCoreModule.h" // For export macro
37#include "vtkObject.h"
38
40class vtkMatrix4x4;
42
43class VTKFILTERSCORE_EXPORT vtkEdgeSubdivisionCriterion : public vtkObject
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
54 virtual bool EvaluateLocationAndFields(double* p1, int field_start) = 0;
55
64 virtual int PassField(int sourceId, int sourceSize, vtkStreamingTessellator* t);
65
71 virtual void ResetFieldList();
72
78 virtual bool DontPassField(int sourceId, vtkStreamingTessellator* t);
79
85 const int* GetFieldIds() const;
86
92 const int* GetFieldOffsets() const;
93
98 int GetOutputField(int fieldId) const;
99
105 int GetNumberOfFields() const;
106
107protected:
110
114
140 bool ViewDependentEval(const double* p0, double* p1, double* p1_actual, const double* p2,
141 int field_start, vtkMatrix4x4* viewtrans, const double* pixelSize,
142 double allowableChordErr) const;
143
175 bool FixedFieldErrorEval(double* p1, double* p1_actual, int field_start, int field_criteria,
176 double* allowableFieldErr) const;
177
178private:
180 void operator=(const vtkEdgeSubdivisionCriterion&) = delete;
181};
182
184{
185 return this->FieldIds;
186}
188{
189 return this->FieldOffsets;
190}
192{
193 return this->NumberOfFields;
194}
195
196#endif // vtkEdgeSubdivisionCriterion_h
represent and manipulate attribute data in a dataset
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided
bool FixedFieldErrorEval(double *p1, double *p1_actual, int field_start, int field_criteria, double *allowableFieldErr) const
Perform the core logic for a fixed multi-criterion, scalar-field based subdivision.
virtual void ResetFieldList()
Don't pass any field values in the vertex pointer.
virtual bool DontPassField(int sourceId, vtkStreamingTessellator *t)
This does the opposite of PassField(); it removes a field from the output (assuming the field was set...
int GetOutputField(int fieldId) const
Return the output ID of an input field.
bool ViewDependentEval(const double *p0, double *p1, double *p1_actual, const double *p2, int field_start, vtkMatrix4x4 *viewtrans, const double *pixelSize, double allowableChordErr) const
Perform the core logic for a view-dependent subdivision.
virtual bool EvaluateLocationAndFields(double *p1, int field_start)=0
You must implement this member function in a subclass.
int GetNumberOfFields() const
Return the number of fields being evaluated at each output vertex.
const int * GetFieldOffsets() const
Return the offset into an output vertex array of all fields.
~vtkEdgeSubdivisionCriterion() override
virtual int PassField(int sourceId, int sourceSize, vtkStreamingTessellator *t)
This is a helper routine called by PassFields() which you may also call directly; it adds sourceSize ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const int * GetFieldIds() const
Return the map from output field id to input field ids.
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
abstract base class for most VTK objects
Definition: vtkObject.h:82
An algorithm that refines an initial simplicial tessellation using edge subdivision.