VTK  9.5.20251012
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkCell;
34class vtkDataSet;
35
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
44 virtual void SetMesh(vtkDataSet*);
45 vtkDataSet* GetMesh();
46
47 const vtkDataSet* GetMesh() const;
48
49 virtual void SetCellId(vtkIdType cell);
50 vtkIdType GetCellId() const;
51
52 vtkIdType& GetCellId();
53
54 vtkCell* GetCell();
55
56 const vtkCell* GetCell() const;
57
58 bool EvaluateLocationAndFields(double* midpt, int field_start) override;
59
98 double* EvaluateFields(double* vertex, double* weights, int field_start);
99
101
106 void EvaluatePointDataField(double* result, double* weights, int field);
107 void EvaluateCellDataField(double* result, double* weights, int field);
109
111
115 vtkSetMacro(ChordError2, double);
116 vtkGetMacro(ChordError2, double);
118
120
126 virtual void SetFieldError2(int s, double err);
127 double GetFieldError2(int s) const;
129
134 virtual void ResetFieldError2();
135
137
142 vtkGetMacro(ActiveFieldCriteria, int);
143
144// With VTK_USE_FUTURE_CONST, vtkGetMacro already makes the member const.
145#if !VTK_USE_FUTURE_CONST
146 int GetActiveFieldCriteria() const { return this->ActiveFieldCriteria; }
147#endif
149
150protected:
153
157
159 double* FieldError2;
163
164private:
166 void operator=(const vtkDataSetEdgeSubdivisionCriterion&) = delete;
167};
168
170{
171 return this->CurrentCellId;
172}
174{
175 return this->CurrentCellId;
176}
177
179{
180 return this->CurrentMesh;
181}
183{
184 return this->CurrentMesh;
185}
186
188{
189 return this->CurrentCellData;
190}
192{
193 return this->CurrentCellData;
194}
195
196VTK_ABI_NAMESPACE_END
197#endif // vtkDataSetEdgeSubdivisionCriterion_h
abstract class to specify cell behavior
Definition vtkCell.h:129
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:166
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:367
#define VTK_MARSHALAUTO