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 =========================================================================*/
33 #ifndef vtkHyperTreeGridAxisClip_h
34 #define vtkHyperTreeGridAxisClip_h
35 
36 #include "vtkFiltersHyperTreeModule.h" // For export macro
38 
39 class vtkBitArray;
40 class vtkHyperTreeCursor;
41 class vtkHyperTreeGrid;
43 class vtkQuadric;
44 
45 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridAxisClip : public vtkHyperTreeGridAlgorithm
46 {
47 public:
48  static vtkHyperTreeGridAxisClip* New();
50  void PrintSelf( ostream&, vtkIndent ) override;
51 
58  enum ClipType
59  {
60  PLANE = 0,
61  BOX,
63  };
64 
66 
70  vtkSetClampMacro(ClipType, int, 0, 2);
71  vtkGetMacro(ClipType, int);
72  void SetClipTypeToPlane() { this->SetClipType( vtkHyperTreeGridAxisClip::PLANE); }
73  void SetClipTypeToBox() { this->SetClipType( vtkHyperTreeGridAxisClip::BOX); }
76 
78 
82  vtkSetClampMacro(PlaneNormalAxis, int, 0, 2);
83  vtkGetMacro(PlaneNormalAxis, int);
85 
87 
91  vtkSetMacro(PlanePosition, double);
92  vtkGetMacro(PlanePosition, double);
94 
96 
99  vtkSetVector6Macro(Bounds,double);
100  vtkGetVectorMacro(Bounds,double,6);
101  void SetMinimumBounds(double x, double y, double z);
102  void SetMaximumBounds(double x, double y, double z);
103  void SetMinimumBounds(double[3]) VTK_SIZEHINT(3);
104  void SetMaximumBounds(double[3]) VTK_SIZEHINT(3);
105  void GetMinimumBounds(double[3]) VTK_SIZEHINT(3);
106  void GetMaximumBounds(double[3]) VTK_SIZEHINT(3);
108 
110 
117  vtkSetMacro(InsideOut,int);
118  vtkGetMacro(InsideOut,int);
119  vtkBooleanMacro(InsideOut,int);
121 
123 
126  virtual void SetQuadric( vtkQuadric* );
127  vtkGetObjectMacro(Quadric, vtkQuadric);
129 
131 
134  void SetQuadricCoefficients(double a0, double a1, double a2, double a3,
135  double a4, double a5, double a6, double a7,
136  double a8, double a9);
137  void SetQuadricCoefficients(double[10]) VTK_SIZEHINT(10) ;
138  void GetQuadricCoefficients(double[10]) VTK_SIZEHINT(10);
139  double* GetQuadricCoefficients();
141 
145  vtkMTimeType GetMTime() override;
146 
147 protected:
149  ~vtkHyperTreeGridAxisClip() override;
150 
151  // For this algorithm the output is a vtkHyperTreeGrid instance
152  int FillOutputPortInformation( int, vtkInformation* ) override;
153 
157  bool IsClipped( vtkHyperTreeGridCursor* );
158 
162  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
163 
167  void RecursivelyProcessTree( vtkHyperTreeGridCursor*,
169  vtkBitArray* );
170 
174  int ClipType;
175 
180 
185 
189  double Bounds[6];
190 
195 
200 
205 
210 
211 private:
213  void operator=(const vtkHyperTreeGridAxisClip&) = delete;
214 };
215 
216 #endif /* vtkHyperTreeGridAxisClip_h */
vtkHyperTreeGridCursor
Objects for depth-first traversal HyperTreeGrids.
Definition: vtkHyperTreeGridCursor.h:45
vtkHyperTreeGridAxisClip::Quadric
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
Definition: vtkHyperTreeGridAxisClip.h:194
vtkHyperTreeGridAxisClip::InsideOut
int InsideOut
Decide what is inside versus what is out.
Definition: vtkHyperTreeGridAxisClip.h:199
vtkHyperTreeGridAxisClip::QUADRIC
Definition: vtkHyperTreeGridAxisClip.h:62
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkHyperTreeGridAxisClip::SetClipTypeToBox
void SetClipTypeToBox()
Definition: vtkHyperTreeGridAxisClip.h:73
vtkHyperTreeGridAlgorithm::ProcessTrees
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
vtkHyperTreeGridAxisClip::SetClipTypeToPlane
void SetClipTypeToPlane()
Definition: vtkHyperTreeGridAxisClip.h:72
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridAxisClip::ClipType
int ClipType
Type of clip to be performed.
Definition: vtkHyperTreeGridAxisClip.h:174
vtkQuadric
evaluate implicit quadric function
Definition: vtkQuadric.h:30
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridAxisClip::PlanePosition
double PlanePosition
Intercept of clipping plane along normal.
Definition: vtkHyperTreeGridAxisClip.h:184
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkHyperTreeGridAxisClip::BOX
Definition: vtkHyperTreeGridAxisClip.h:61
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkHyperTreeGridAxisClip::SetClipTypeToQuadric
void SetClipTypeToQuadric()
Definition: vtkHyperTreeGridAxisClip.h:74
vtkHyperTreeGridAxisClip::PLANE
Definition: vtkHyperTreeGridAxisClip.h:60
vtkHyperTreeGridAxisClip
Axis aligned hyper tree grid clip.
Definition: vtkHyperTreeGridAxisClip.h:45
vtkHyperTreeGridAxisClip::MaterialMask
vtkBitArray * MaterialMask
Output material mask constructed by this filter.
Definition: vtkHyperTreeGridAxisClip.h:204
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkHyperTreeGridAxisClip::PlaneNormalAxis
int PlaneNormalAxis
Direction of clipping plane normal.
Definition: vtkHyperTreeGridAxisClip.h:179
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:58
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:46
vtkHyperTreeGridAxisClip::CurrentId
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
Definition: vtkHyperTreeGridAxisClip.h:209
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:67
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302