VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkCell;
34 class vtkDataSet;
35 
38 {
39 public:
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
148 
150 protected:
153 
157 
158  double ChordError2;
159  double* FieldError2;
163 
164 private:
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 
196 VTK_ABI_NAMESPACE_END
197 #endif // vtkDataSetEdgeSubdivisionCriterion_h
a subclass of vtkEdgeSubdivisionCriterion for vtkDataSet objects.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
int GetActiveFieldCriteria() const
Return a bitfield specifying which FieldError2 criteria are positive (i.e., actively used to decide e...
int vtkIdType
Definition: vtkType.h:363
abstract class to specify cell behavior
Definition: vtkCell.h:50
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 ...
#define VTK_MARSHALAUTO
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.