VTK  9.3.1
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
6 
29 #include "vtkFiltersCoreModule.h" // For export macro
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkCell;
33 class vtkDataSet;
34 
36 {
37 public:
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
146 
148 protected:
151 
155 
156  double ChordError2;
157  double* FieldError2;
161 
162 private:
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 
194 VTK_ABI_NAMESPACE_END
195 #endif // vtkDataSetEdgeSubdivisionCriterion_h
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int GetActiveFieldCriteria() const
Return a bitfield specifying which FieldError2 criteria are positive (i.e., actively used to decide e...
int vtkIdType
Definition: vtkType.h:315
abstract class to specify cell behavior
Definition: vtkCell.h:49
a simple class to control print indentation
Definition: vtkIndent.h:28
how to decide whether a linear approximation to nonlinear geometry or field should be subdivided ...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual bool EvaluateLocationAndFields(double *p1, int field_start)=0
You must implement this member function in a subclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.