VTK  9.4.20250105
vtkHyperTreeGridGeometry3DImpl.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
11#ifndef vtkHyperTreeGridGeometry3DImpl_h
12#define vtkHyperTreeGridGeometry3DImpl_h
13
15
16#include <map> // For std::map
17
18VTK_ABI_NAMESPACE_BEGIN
19
20class vtkBitArray;
22
24{
25public:
26 vtkHyperTreeGridGeometry3DImpl(bool mergePoints, vtkHyperTreeGrid* input, vtkPoints* outPoints,
27 vtkCellArray* outCells, vtkDataSetAttributes* inCellDataAttributes,
28 vtkDataSetAttributes* outCellDataAttributes, bool passThroughCellIds,
29 const std::string& originalCellIdArrayName);
30
32
36 void GenerateGeometry() override;
37
38protected:
47 unsigned char coarseCellFacesToBeTreated = 0);
48
49private:
50 struct HTG3DPoint;
51
56 void GenerateCellSurface(vtkHyperTreeGridNonOrientedVonNeumannSuperCursor* cursor,
57 unsigned char coarseCellFacesToBeTreated, vtkIdType cellId);
58
62 void GenerateOneCellFace(std::vector<HTG3DPoint>& cellPoints,
63 std::vector<std::pair<HTG3DPoint, HTG3DPoint>>& edgePoints, unsigned int faceId,
64 vtkIdType cellId, const double* cellOrigin, const double* cellSize, unsigned int zOffset,
65 unsigned int orientation,
66 std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFaceA,
67 std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFaceB);
68
78 void ComputeEdge(const HTG3DPoint& firstPoint, const HTG3DPoint& secondPoint,
79 std::vector<std::pair<HTG3DPoint, HTG3DPoint>>& edgePoints, unsigned int edgeAxis,
80 unsigned int edgeId,
81 std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFaceA,
82 std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFaceB,
83 unsigned int& currentEdgePointA, unsigned int& currentEdgePointB);
84
91 bool ComputeEdgeInterface(const HTG3DPoint& firstPoint, const HTG3DPoint& secondPoint,
92 std::vector<std::pair<HTG3DPoint, HTG3DPoint>>& edgePoints, unsigned int edgeAxis,
93 unsigned int edgeId, std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFace,
94 HTG3DPoint& pointInter, unsigned int& edgePointId, bool isInterfaceA);
95
102 void CompleteLinkage(std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFace,
103 unsigned int edgePointId1, unsigned int edgePointId2);
104
110 void SetInterfaceFace(unsigned int edgeId,
111 std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFace, HTG3DPoint* point);
112
116 bool IsInside(const HTG3DPoint& point);
117
121 void SetXYZ(HTG3DPoint& point, const double* coords);
122
126 void SetIntersectXYZ(HTG3DPoint& point, const double* coords, bool isInterfaceA);
127
134 vtkIdType InsertUniquePoint(HTG3DPoint& point);
135
142 bool GetHasInterface(vtkIdType cellId) const;
143
147 int BranchFactor;
148
154 vtkBitArray* InPureMaskArray;
155
160};
161
162VTK_ABI_NAMESPACE_END
163#endif /* vtkHyperTreeGridGeometry3DImpl_h */
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:29
object to represent cell connectivity
represent and manipulate attribute data in a dataset
vtkHyperTreeGridGeometry internal classes for 3D vtkHyperTreeGrid
void GenerateGeometry() override
Generate the external surface of the input vtkHyperTreeGrid.
void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedVonNeumannSuperCursor *cursor, unsigned char coarseCellFacesToBeTreated=0)
Recursively browse the input HTG in order to generate the output surface.
~vtkHyperTreeGridGeometry3DImpl() override
vtkHyperTreeGridGeometry3DImpl(bool mergePoints, vtkHyperTreeGrid *input, vtkPoints *outPoints, vtkCellArray *outCells, vtkDataSetAttributes *inCellDataAttributes, vtkDataSetAttributes *outCellDataAttributes, bool passThroughCellIds, const std::string &originalCellIdArrayName)
Interface for all vtkHyperTreeGridGeometry internal classes.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
represent and manipulate 3D points
Definition vtkPoints.h:139
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:315