VTK  9.4.20241218
vtkDataSetEdgeSubdivisionCriterion.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 vtkDataSetEdgeSubdivisionCriterion_h
5#define vtkDataSetEdgeSubdivisionCriterion_h
29#include "vtkFiltersCoreModule.h" // For export macro
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkCell;
33class vtkDataSet;
34
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
42 virtual void SetMesh(vtkDataSet*);
43 vtkDataSet* GetMesh();
44
45 const vtkDataSet* GetMesh() const;
46
47 virtual void SetCellId(vtkIdType cell);
48 vtkIdType GetCellId() const;
49
50 vtkIdType& GetCellId();
51
52 vtkCell* GetCell();
53
54 const vtkCell* GetCell() const;
55
56 bool EvaluateLocationAndFields(double* midpt, int field_start) override;
57
96 double* EvaluateFields(double* vertex, double* weights, int field_start);
97
99
104 void EvaluatePointDataField(double* result, double* weights, int field);
105 void EvaluateCellDataField(double* result, double* weights, int field);
107
109
113 vtkSetMacro(ChordError2, double);
114 vtkGetMacro(ChordError2, double);
116
118
124 virtual void SetFieldError2(int s, double err);
125 double GetFieldError2(int s) const;
127
132 virtual void ResetFieldError2();
133
135
140 vtkGetMacro(ActiveFieldCriteria, int);
141
142// With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
143#if !VTK_USE_FUTURE_CONST
144 int GetActiveFieldCriteria() const { return this->ActiveFieldCriteria; }
145#endif
147
148protected:
151
155
157 double* FieldError2;
161
162private:
164 void operator=(const vtkDataSetEdgeSubdivisionCriterion&) = delete;
165};
166
168{
169 return this->CurrentCellId;
170}
172{
173 return this->CurrentCellId;
174}
175
177{
178 return this->CurrentMesh;
179}
181{
182 return this->CurrentMesh;
183}
184
186{
187 return this->CurrentCellData;
188}
190{
191 return this->CurrentCellData;
192}
193
194VTK_ABI_NAMESPACE_END
195#endif // vtkDataSetEdgeSubdivisionCriterion_h
abstract class to specify cell behavior
Definition vtkCell.h:130
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
virtual void SetMesh(vtkDataSet *)
virtual void ResetFieldError2()
Tell the subdivider not to use any field values as subdivision criteria.
void EvaluateCellDataField(double *result, double *weights, int field)
Evaluate either a cell or nodal field.
virtual void SetFieldError2(int s, double err)
Get/Set the square of the allowable error magnitude for the scalar field s at any edge's midpoint.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double * EvaluateFields(double *vertex, double *weights, int field_start)
Evaluate all of the fields that should be output with the given vertex and store them just past the p...
virtual void SetCellId(vtkIdType cell)
void EvaluatePointDataField(double *result, double *weights, int field)
Evaluate either a cell or nodal field.
bool EvaluateLocationAndFields(double *midpt, int field_start) override
You must implement this member function in a subclass.
static vtkDataSetEdgeSubdivisionCriterion * New()
int GetActiveFieldCriteria() const
Return a bitfield specifying which FieldError2 criteria are positive (i.e., actively used to decide e...
double GetFieldError2(int s) const
Get/Set the square of the allowable error magnitude for the scalar field s at any edge's midpoint.
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided
a simple class to control print indentation
Definition vtkIndent.h:108
int vtkIdType
Definition vtkType.h:315