VTK  9.7.1
vtkHyperTreeGridGeometryImpl.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkHyperTreeGridGeometryImpl_h
17 #define vtkHyperTreeGridGeometryImpl_h
18 
20 #include "vtkIdTypeArray.h"
21 
22 #include <vector> // For std::vector
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 
26 class vtkDataArray;
27 class vtkMergePoints;
28 class vtkPoints;
30 
32 {
33 public:
35  vtkCellArray* outCells, vtkDataSetAttributes* inCellDataAttributes,
36  vtkDataSetAttributes* outCellDataAttributes, bool passThroughCellIds,
37  const std::string& originalCellIdArrayName, bool fillMaterial);
38 
39  virtual ~vtkHyperTreeGridGeometryImpl() = default;
40 
45  virtual void GenerateGeometry() = 0;
46 
47 protected:
49 
58  double ComputeDistanceToInterfaceA(const double* xyz) const;
59  double ComputeDistanceToInterfaceB(const double* xyz) const;
61 
67  void CreateNewCellAndCopyData(const std::vector<vtkIdType>& outPointIds, vtkIdType cellId);
68 
72  bool IsMaskedOrGhost(vtkIdType globalNodeId) const;
73 
86  bool ProbeForCellInterface(vtkIdType cellId, bool invert = true);
87 
91  vtkHyperTreeGrid* Input = nullptr;
92  vtkPoints* OutPoints = nullptr;
93  vtkCellArray* OutCells = nullptr;
96  bool FillMaterial = true;
97 
103 
108  bool HasInterface = false;
109 
118 
132  int CellInterfaceType = 2; // pure cell
133 
134 private:
138  vtkUnsignedCharArray* InGhostArray = nullptr;
139  vtkBitArray* InMaskArray = nullptr;
140 
144  bool PassThroughCellIds = false;
145  std::string OriginalCellIdArrayName;
146 
160  std::vector<double> CellIntercepts;
161 
169  std::vector<double> CellNormals;
170 };
171 
172 VTK_ABI_NAMESPACE_END
173 #endif /* vtkHyperTreeGridGeometryImpl_h */
bool HasInterfaceOnThisCell
True if the current cell have a "valid" interface defined.
Interface for all vtkHyperTreeGridGeometry internal classes.
virtual ~vtkHyperTreeGridGeometryImpl()=default
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
bool HasInterface
True if input HTG have an interface and if InIntercepts and InNormals are defined.
int vtkIdType
Definition: vtkType.h:363
bool ProbeForCellInterface(vtkIdType cellId, bool invert=true)
Determine if the input HTG at cellId contains an valid interface and if yes, determine its characteri...
vtkHyperTreeGridGeometryImpl(vtkHyperTreeGrid *input, vtkPoints *outPoints, vtkCellArray *outCells, vtkDataSetAttributes *inCellDataAttributes, vtkDataSetAttributes *outCellDataAttributes, bool passThroughCellIds, const std::string &originalCellIdArrayName, bool fillMaterial)
vtkHyperTreeGrid * Input
Input parameters retrieved from constructor.
vtkDataSetAttributes * OutCellDataAttributes
merge exactly coincident points
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual void GenerateGeometry()=0
Generate the external surface of the input vtkHyperTreeGrid.
represent and manipulate attribute data in a dataset
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:177
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:32
double ComputeDistanceToInterfaceB(const double *xyz) const
Compute the value of the distance from the given point to the interface plane of the currently consid...
vtkDataArray * InIntercepts
Retrieved from input for quick access.
void CreateNewCellAndCopyData(const std::vector< vtkIdType > &outPointIds, vtkIdType cellId)
Insert a new output cell from a list of point ids in the output polydata and copy the data from the i...
double ComputeDistanceToInterfaceA(const double *xyz) const
Compute the value of the distance from the given point to the interface plane of the currently consid...
bool IsMaskedOrGhost(vtkIdType globalNodeId) const
Returns true if the input HTG cell is masked or ghosted.
int CellInterfaceType
Categorize the current cell interface type.
represent and manipulate 3D points
Definition: vtkPoints.h:30