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:
51  static vtkHyperTreeGridAxisClip* New();
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 GetMinimumBounds( double[3] );
105  void GetMaximumBounds( double[3] );
107 
109 
116  vtkSetMacro(InsideOut,int);
117  vtkGetMacro(InsideOut,int);
118  vtkBooleanMacro(InsideOut,int);
120 
122 
125  virtual void SetQuadric( vtkQuadric* );
126  vtkGetObjectMacro(Quadric, vtkQuadric);
128 
130 
133  void SetQuadricCoefficients( double[10] );
134  void GetQuadricCoefficients( double[10] );
135  double* GetQuadricCoefficients();
137 
141  vtkMTimeType GetMTime() override;
142 
143 protected:
145  ~vtkHyperTreeGridAxisClip() override;
146 
147  // For this algorithm the output is a vtkHyperTreeGrid instance
148  int FillOutputPortInformation( int, vtkInformation* ) override;
149 
153  bool IsClipped( vtkHyperTreeGridCursor* );
154 
158  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
159 
163  void RecursivelyProcessTree( vtkHyperTreeGridCursor*,
165  vtkBitArray* );
166 
170  int ClipType;
171 
176 
181 
185  double Bounds[6];
186 
191 
196 
201 
206 
207 private:
209  void operator=(const vtkHyperTreeGridAxisClip&) = delete;
210 };
211 
212 #endif /* vtkHyperTreeGridAxisClip_h */
void SetClipTypeToQuadric()
Set/get type of clip.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
Store vtkAlgorithm input/output information.
int ClipType
Type of clip to be performed.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
vtkBitArray * MaterialMask
Output material mask constructed by this filter.
int vtkIdType
Definition: vtkType.h:345
Objects for depth-first traversal HyperTrees.
Objects for depth-first traversal HyperTreeGrids.
a simple class to control print indentation
Definition: vtkIndent.h:39
evaluate implicit quadric function
Definition: vtkQuadric.h:36
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Axis aligned hyper tree grid clip.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double PlanePosition
Intercept of clipping plane along normal.
int PlaneNormalAxis
Direction of clipping plane normal.
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
ClipType
Methods by which the hyper tree grid input may be clipped: PLANE: Clip with an axis-aligned plane def...
void SetClipTypeToBox()
Set/get type of clip.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
Superclass for algorithms that produce a hyper tree grid as output.
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
int InsideOut
Decide what is inside versus what is out.
static vtkAlgorithm * New()
void SetClipTypeToPlane()
Set/get type of clip.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...