VTK  9.3.20240424
vtkHyperTreeGridAxisClip.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
25#ifndef vtkHyperTreeGridAxisClip_h
26#define vtkHyperTreeGridAxisClip_h
27
28#include "vtkFiltersHyperTreeModule.h" // For export macro
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkBitArray;
34class vtkQuadric;
37
38class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridAxisClip : public vtkHyperTreeGridAlgorithm
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
52 {
53 PLANE = 0,
56 };
57
59
63 vtkSetClampMacro(ClipType, int, 0, 2);
64 vtkGetMacro(ClipType, int);
66 void SetClipTypeToBox() { this->SetClipType(vtkHyperTreeGridAxisClip::BOX); }
69
71
75 vtkSetClampMacro(PlaneNormalAxis, int, 0, 2);
76 vtkGetMacro(PlaneNormalAxis, int);
78
80
84 vtkSetMacro(PlanePosition, double);
85 vtkGetMacro(PlanePosition, double);
87
89
92 vtkSetVector6Macro(Bounds, double);
93 vtkGetVectorMacro(Bounds, double, 6);
94 void GetMinimumBounds(double[3]);
95 void GetMaximumBounds(double[3]);
97
99
106 vtkSetMacro(InsideOut, bool);
107 vtkGetMacro(InsideOut, bool);
108 vtkBooleanMacro(InsideOut, bool);
110
112
115 virtual void SetQuadric(vtkQuadric*);
116 vtkGetObjectMacro(Quadric, vtkQuadric);
118
120
123 void SetQuadricCoefficients(double a, double b, double c, double d, double e, double f, double g,
124 double h, double i, double j)
125 {
126 double array[10] = { a, b, c, d, e, f, g, h, i, j };
127 this->SetQuadricCoefficients(array);
128 }
129 void SetQuadricCoefficients(double[10]);
130 void GetQuadricCoefficients(double[10]);
133
138
139protected:
142
143 // For this algorithm the output is a vtkHyperTreeGrid instance
145
150
155
161
166
171
177
181 double Bounds[6];
182
187
192
198
203
204private:
206 void operator=(const vtkHyperTreeGridAxisClip&) = delete;
207};
208
209VTK_ABI_NAMESPACE_END
210#endif // vtkHyperTreeGridAxisClip_h
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:29
general representation of visualization data
Superclass for algorithms that produce a hyper tree grid as output.
Axis aligned hyper tree grid clip.
void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor *inCursor, vtkHyperTreeGridNonOrientedCursor *outCursor)
Recursively descend into tree down to leaves.
void GetMinimumBounds(double[3])
Set/get bounds of clipping box.
vtkMTimeType GetMTime() override
Override GetMTime because we delegate to a vtkQuadric.
int PlaneNormalAxis
Direction of clipping plane normal.
double PlanePosition
Intercept of clipping plane along normal.
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
~vtkHyperTreeGridAxisClip() override
int ClipType
Type of clip to be performed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetQuadricCoefficients(double[10])
Helpers to set/get the 10 coefficients of the quadric function.
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to generate hyper tree grid clip.
ClipType
Methods by which the hyper tree grid input may be clipped: PLANE: Clip with an axis-aligned plane def...
virtual void SetQuadric(vtkQuadric *)
Set/Get the clipping quadric function.
vtkBitArray * InMask
Output material mask constructed by this filter.
static vtkHyperTreeGridAxisClip * New()
bool InsideOut
Decide what is inside versus what is out.
bool IsClipped(vtkHyperTreeGridNonOrientedGeometryCursor *)
Decide whether the cell is clipped out.
void SetClipTypeToQuadric()
Set/get type of clip.
void GetMaximumBounds(double[3])
Set/get bounds of clipping box.
double * GetQuadricCoefficients()
Helpers to set/get the 10 coefficients of the quadric function.
void SetClipTypeToPlane()
Set/get type of clip.
void GetQuadricCoefficients(double[10])
Helpers to set/get the 10 coefficients of the quadric function.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
void SetQuadricCoefficients(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j)
Helpers to set/get the 10 coefficients of the quadric function.
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
void SetClipTypeToBox()
Set/get type of clip.
Objects for traversal a HyperTreeGrid.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
evaluate implicit quadric function
Definition vtkQuadric.h:112
Computes the portion of a dataset which is inside a selection.
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270