VTK
vtkHyperTreeGridAxisClip.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridAxisClip.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
36 #ifndef vtkHyperTreeGridAxisClip_h
37 #define vtkHyperTreeGridAxisClip_h
38 
39 #include "vtkFiltersHyperTreeModule.h" // For export macro
41 
42 class vtkBitArray;
43 class vtkHyperTreeCursor;
44 class vtkHyperTreeGrid;
46 class vtkQuadric;
47 
48 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridAxisClip : public vtkHyperTreeGridAlgorithm
49 {
50 public:
53  void PrintSelf( ostream&, vtkIndent ) override;
54 
61  enum ClipType
62  {
63  PLANE = 0,
64  BOX,
66  };
67 
69 
73  vtkSetClampMacro(ClipType, int, 0, 2);
74  vtkGetMacro(ClipType, int);
75  void SetClipTypeToPlane() { this->SetClipType( vtkHyperTreeGridAxisClip::PLANE); }
76  void SetClipTypeToBox() { this->SetClipType( vtkHyperTreeGridAxisClip::BOX); }
79 
81 
85  vtkSetClampMacro(PlaneNormalAxis, int, 0, 2);
86  vtkGetMacro(PlaneNormalAxis, int);
88 
90 
94  vtkSetMacro(PlanePosition, double);
95  vtkGetMacro(PlanePosition, double);
97 
99 
102  vtkSetVector6Macro(Bounds,double);
103  vtkGetVectorMacro(Bounds,double,6);
104  void SetMinimumBounds(double x, double y, double z);
105  void SetMaximumBounds(double x, double y, double z);
106  void SetMinimumBounds(double[3]) VTK_SIZEHINT(3);
107  void SetMaximumBounds(double[3]) VTK_SIZEHINT(3);
108  void GetMinimumBounds(double[3]) VTK_SIZEHINT(3);
109  void GetMaximumBounds(double[3]) VTK_SIZEHINT(3);
111 
113 
120  vtkSetMacro(InsideOut,int);
121  vtkGetMacro(InsideOut,int);
122  vtkBooleanMacro(InsideOut,int);
124 
126 
129  virtual void SetQuadric( vtkQuadric* );
130  vtkGetObjectMacro(Quadric, vtkQuadric);
132 
134 
137  void SetQuadricCoefficients(double a0, double a1, double a2, double a3,
138  double a4, double a5, double a6, double a7,
139  double a8, double a9);
140  void SetQuadricCoefficients(double[10]) VTK_SIZEHINT(10) ;
141  void GetQuadricCoefficients(double[10]) VTK_SIZEHINT(10);
144 
148  vtkMTimeType GetMTime() override;
149 
150 protected:
153 
154  // For this algorithm the output is a vtkHyperTreeGrid instance
156 
161 
166 
172  vtkBitArray* );
173 
177  int ClipType;
178 
183 
188 
192  double Bounds[6];
193 
198 
203 
208 
213 
214 private:
216  void operator=(const vtkHyperTreeGridAxisClip&) = delete;
217 };
218 
219 #endif /* vtkHyperTreeGridAxisClip_h */
vtkHyperTreeGridCursor
Objects for depth-first traversal HyperTreeGrids.
Definition: vtkHyperTreeGridCursor.h:46
vtkHyperTreeGridAxisClip::Quadric
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
Definition: vtkHyperTreeGridAxisClip.h:197
vtkHyperTreeGridAxisClip::InsideOut
int InsideOut
Decide what is inside versus what is out.
Definition: vtkHyperTreeGridAxisClip.h:202
vtkHyperTreeGridAxisClip::QUADRIC
@ QUADRIC
Definition: vtkHyperTreeGridAxisClip.h:65
vtkHyperTreeGridAxisClip::SetMinimumBounds
void SetMinimumBounds(double x, double y, double z)
vtkHyperTreeGridAxisClip::New
static vtkHyperTreeGridAxisClip * New()
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkHyperTreeGridAxisClip::ProcessTrees
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to generate hyper tree grid clip.
vtkHyperTreeGridAxisClip::SetClipTypeToBox
void SetClipTypeToBox()
Definition: vtkHyperTreeGridAxisClip.h:76
vtkHyperTreeGridAxisClip::SetMinimumBounds
void SetMinimumBounds(double[3])
vtkHyperTreeGridAxisClip::~vtkHyperTreeGridAxisClip
~vtkHyperTreeGridAxisClip() override
vtkHyperTreeGridAxisClip::SetClipTypeToPlane
void SetClipTypeToPlane()
Definition: vtkHyperTreeGridAxisClip.h:75
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridAxisClip::ClipType
int ClipType
Type of clip to be performed.
Definition: vtkHyperTreeGridAxisClip.h:177
vtkQuadric
evaluate implicit quadric function
Definition: vtkQuadric.h:37
vtkHyperTreeGridAxisClip::PlanePosition
double PlanePosition
Intercept of clipping plane along normal.
Definition: vtkHyperTreeGridAxisClip.h:187
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkHyperTreeGridAxisClip::SetMaximumBounds
void SetMaximumBounds(double x, double y, double z)
vtkHyperTreeGridAxisClip::BOX
@ BOX
Definition: vtkHyperTreeGridAxisClip.h:64
vtkHyperTreeGridAxisClip::RecursivelyProcessTree
void RecursivelyProcessTree(vtkHyperTreeGridCursor *, vtkHyperTreeCursor *, vtkBitArray *)
Recursively descend into tree down to leaves.
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:43
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkHyperTreeGridAxisClip::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkHyperTreeGridAxisClip::GetQuadricCoefficients
void GetQuadricCoefficients(double[10])
vtkHyperTreeGridAxisClip::SetClipTypeToQuadric
void SetClipTypeToQuadric()
Definition: vtkHyperTreeGridAxisClip.h:77
vtkHyperTreeGridAxisClip::GetMTime
vtkMTimeType GetMTime() override
Override GetMTime because we delegate to a vtkQuadric.
vtkHyperTreeGridAxisClip::PLANE
@ PLANE
Definition: vtkHyperTreeGridAxisClip.h:63
vtkHyperTreeGridAxisClip::vtkHyperTreeGridAxisClip
vtkHyperTreeGridAxisClip()
vtkHyperTreeGridAxisClip::SetQuadric
virtual void SetQuadric(vtkQuadric *)
Set/Get the clipping quadric function.
vtkHyperTreeGridAxisClip
Axis aligned hyper tree grid clip.
Definition: vtkHyperTreeGridAxisClip.h:49
vtkHyperTreeGridAxisClip::GetMinimumBounds
void GetMinimumBounds(double[3])
vtkHyperTreeGridAxisClip::MaterialMask
vtkBitArray * MaterialMask
Output material mask constructed by this filter.
Definition: vtkHyperTreeGridAxisClip.h:207
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkHyperTreeGridAxisClip::GetQuadricCoefficients
double * GetQuadricCoefficients()
vtkHyperTreeGridAxisClip::PrintSelf
void PrintSelf(ostream &, vtkIndent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridAxisClip::GetMaximumBounds
void GetMaximumBounds(double[3])
vtkHyperTreeGridAxisClip::PlaneNormalAxis
int PlaneNormalAxis
Direction of clipping plane normal.
Definition: vtkHyperTreeGridAxisClip.h:182
vtkHyperTreeGridAxisClip::ClipType
ClipType
Methods by which the hyper tree grid input may be clipped: PLANE: Clip with an axis-aligned plane def...
Definition: vtkHyperTreeGridAxisClip.h:62
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:37
vtkHyperTreeGridAxisClip::SetQuadricCoefficients
void SetQuadricCoefficients(double a0, double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9)
Helpers to set/get the 10 coefficients of the quadric function.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkHyperTreeGridAxisClip::SetQuadricCoefficients
void SetQuadricCoefficients(double[10])
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:47
vtkHyperTreeGridAxisClip::IsClipped
bool IsClipped(vtkHyperTreeGridCursor *)
Decide whether the cell is clipped out.
vtkHyperTreeGridAxisClip::CurrentId
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
Definition: vtkHyperTreeGridAxisClip.h:212
vtkHyperTreeGridAxisClip::SetMaximumBounds
void SetMaximumBounds(double[3])
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:71
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302