VTK  9.4.20250106
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
24VTK_ABI_NAMESPACE_BEGIN
25
26class vtkDataArray;
27class vtkMergePoints;
28class vtkPoints;
30
32{
33public:
35 vtkCellArray* outCells, vtkDataSetAttributes* inCellDataAttributes,
36 vtkDataSetAttributes* outCellDataAttributes, bool passThroughCellIds,
37 const std::string& originalCellIdArrayName);
38
39 virtual ~vtkHyperTreeGridGeometryImpl() = default;
40
45 virtual void GenerateGeometry() = 0;
46
47protected:
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
96
102
107 bool HasInterface = false;
108
117
130 int CellInterfaceType = 2; // pure cell
131
132private:
136 vtkUnsignedCharArray* InGhostArray;
137 vtkBitArray* InMaskArray;
138
142 bool PassThroughCellIds = false;
143 std::string OriginalCellIdArrayName;
144
158 std::vector<double> CellIntercepts;
159
167 std::vector<double> CellNormals;
168};
169
170VTK_ABI_NAMESPACE_END
171#endif /* vtkHyperTreeGridGeometryImpl_h */
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:29
object to represent cell connectivity
abstract superclass for arrays of numeric data
represent and manipulate attribute data in a dataset
Interface for all vtkHyperTreeGridGeometry internal classes.
vtkDataArray * InIntercepts
Retrieved from input for quick access.
int CellInterfaceType
Categorize the current cell interface type.
double ComputeDistanceToInterfaceB(const double *xyz) const
Compute the value of the distance from the given point to the interface plane of the currently consid...
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 HasInterface
True if input HTG have an interface and if InIntercepts and InNormals are defined.
virtual void GenerateGeometry()=0
Generate the external surface of the input vtkHyperTreeGrid.
bool HasInterfaceOnThisCell
True if the current cell have a "valid" interface defined.
vtkHyperTreeGridGeometryImpl(vtkHyperTreeGrid *input, vtkPoints *outPoints, vtkCellArray *outCells, vtkDataSetAttributes *inCellDataAttributes, vtkDataSetAttributes *outCellDataAttributes, bool passThroughCellIds, const std::string &originalCellIdArrayName)
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...
bool ProbeForCellInterface(vtkIdType cellId, bool invert=true)
Determine if the input HTG at cellId contains an valid interface and if yes, determine its characteri...
vtkHyperTreeGrid * Input
Input parameters retrieved from constructor.
virtual ~vtkHyperTreeGridGeometryImpl()=default
bool IsMaskedOrGhost(vtkIdType globalNodeId) const
Returns true if the input HTG cell is masked or ghosted.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
merge exactly coincident points
represent and manipulate 3D points
Definition vtkPoints.h:139
dynamic, self-adjusting array of unsigned char
int vtkIdType
Definition vtkType.h:315