VTK: Filters/Core/vtkEdgeSubdivisionCriterion.h Source File

| VTK 9.3.1

vtkEdgeSubdivisionCriterion.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2003 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4 #ifndef vtkEdgeSubdivisionCriterion_h
5 #define vtkEdgeSubdivisionCriterion_h
28 #include "vtkFiltersCoreModule.h" // For export macro
29 #include "vtkObject.h"
30
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkDataSetAttributes;
33 class vtkMatrix4x4;
34 class vtkStreamingTessellator;
35
36 class VTKFILTERSCORE_EXPORT vtkEdgeSubdivisionCriterion : public vtkObject
37 {
38 public:
39 vtkTypeMacro(vtkEdgeSubdivisionCriterion, vtkObject);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
47 virtual bool EvaluateLocationAndFields(double* p1, int field_start) = 0;
48
57 virtual int PassField(int sourceId, int sourceSize, vtkStreamingTessellator* t);
58
64 virtual void ResetFieldList();
65
71 virtual bool DontPassField(int sourceId, vtkStreamingTessellator* t);
72
78 const int* GetFieldIds() const;
79
85 const int* GetFieldOffsets() const;
86
91 int GetOutputField(int fieldId) const;
92
98 int GetNumberOfFields() const;
99
100 protected:
101 vtkEdgeSubdivisionCriterion();
102 ~vtkEdgeSubdivisionCriterion() override;
103
104 int* FieldIds;
105 int* FieldOffsets;
106 int NumberOfFields;
107
133 bool ViewDependentEval(const double* p0, double* p1, double* p1_actual, const double* p2,
134 int field_start, vtkMatrix4x4* viewtrans, const double* pixelSize,
135 double allowableChordErr) const;
136
168 bool FixedFieldErrorEval(double* p1, double* p1_actual, int field_start, int field_criteria,
169 double* allowableFieldErr) const;
170
171 private:
172 vtkEdgeSubdivisionCriterion(const vtkEdgeSubdivisionCriterion&) = delete;
173 void operator=(const vtkEdgeSubdivisionCriterion&) = delete;
174 };
175
176 inline const int* vtkEdgeSubdivisionCriterion::GetFieldIds() const
177 {
178 return this->FieldIds;
179 }
180 inline const int* vtkEdgeSubdivisionCriterion::GetFieldOffsets() const
181 {
182 return this->FieldOffsets;
183 }
184 inline int vtkEdgeSubdivisionCriterion::GetNumberOfFields() const
185 {
186 return this->NumberOfFields;
187 }
188
189 VTK_ABI_NAMESPACE_END
190 #endif // vtkEdgeSubdivisionCriterion_h
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkEdgeSubdivisionCriterion
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided
Definition: vtkEdgeSubdivisionCriterion.h:37
vtkEdgeSubdivisionCriterion::FixedFieldErrorEval
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.
vtkEdgeSubdivisionCriterion::ResetFieldList
virtual void ResetFieldList()
Don't pass any field values in the vertex pointer.
vtkEdgeSubdivisionCriterion::vtkEdgeSubdivisionCriterion
vtkEdgeSubdivisionCriterion()
vtkEdgeSubdivisionCriterion::DontPassField
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...
vtkEdgeSubdivisionCriterion::FieldOffsets
int * FieldOffsets
Definition: vtkEdgeSubdivisionCriterion.h:105
vtkEdgeSubdivisionCriterion::GetOutputField
int GetOutputField(int fieldId) const
Return the output ID of an input field.
vtkEdgeSubdivisionCriterion::ViewDependentEval
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.
vtkEdgeSubdivisionCriterion::NumberOfFields
int NumberOfFields
Definition: vtkEdgeSubdivisionCriterion.h:106
vtkEdgeSubdivisionCriterion::EvaluateLocationAndFields
virtual bool EvaluateLocationAndFields(double *p1, int field_start)=0
You must implement this member function in a subclass.
vtkEdgeSubdivisionCriterion::GetNumberOfFields
int GetNumberOfFields() const
Return the number of fields being evaluated at each output vertex.
Definition: vtkEdgeSubdivisionCriterion.h:184
vtkEdgeSubdivisionCriterion::GetFieldOffsets
const int * GetFieldOffsets() const
Return the offset into an output vertex array of all fields.
Definition: vtkEdgeSubdivisionCriterion.h:180
vtkEdgeSubdivisionCriterion::FieldIds
int * FieldIds
Definition: vtkEdgeSubdivisionCriterion.h:104
vtkEdgeSubdivisionCriterion::~vtkEdgeSubdivisionCriterion
~vtkEdgeSubdivisionCriterion() override
vtkEdgeSubdivisionCriterion::PassField
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 ...
vtkEdgeSubdivisionCriterion::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkEdgeSubdivisionCriterion::GetFieldIds
const int * GetFieldIds() const
Return the map from output field id to input field ids.
Definition: vtkEdgeSubdivisionCriterion.h:176
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkStreamingTessellator
An algorithm that refines an initial simplicial tessellation using edge subdivision.
Definition: vtkStreamingTessellator.h:79
vtkObject.h