VTK  9.2.6
vtkSphereTreeFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSphereTreeFilter.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 =========================================================================*/
44 #ifndef vtkSphereTreeFilter_h
45 #define vtkSphereTreeFilter_h
46 
47 #include "vtkFiltersCoreModule.h" // For export macro
48 #include "vtkPolyDataAlgorithm.h"
49 
50 #define VTK_SPHERE_TREE_LEVELS 0
51 #define VTK_SPHERE_TREE_POINT 1
52 #define VTK_SPHERE_TREE_LINE 2
53 #define VTK_SPHERE_TREE_PLANE 3
54 
55 class vtkSphereTree;
56 
57 class VTKFILTERSCORE_EXPORT vtkSphereTreeFilter : public vtkPolyDataAlgorithm
58 {
59 public:
63  static vtkSphereTreeFilter* New();
64 
66 
70  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
74 
77  virtual void SetSphereTree(vtkSphereTree*);
78  vtkGetObjectMacro(SphereTree, vtkSphereTree);
80 
82 
90  vtkSetMacro(ExtractionMode, int);
91  vtkGetMacro(ExtractionMode, int);
92  void SetExtractionModeToLevels() { this->SetExtractionMode(VTK_SPHERE_TREE_LEVELS); }
93  void SetExtractionModeToPoint() { this->SetExtractionMode(VTK_SPHERE_TREE_POINT); }
94  void SetExtractionModeToLine() { this->SetExtractionMode(VTK_SPHERE_TREE_LINE); }
95  void SetExtractionModeToPlane() { this->SetExtractionMode(VTK_SPHERE_TREE_PLANE); }
96  const char* GetExtractionModeAsString();
98 
100 
105  vtkSetMacro(TreeHierarchy, bool);
106  vtkGetMacro(TreeHierarchy, bool);
107  vtkBooleanMacro(TreeHierarchy, bool);
109 
111 
118  vtkSetClampMacro(Level, int, -1, VTK_SHORT_MAX);
119  vtkGetMacro(Level, int);
121 
123 
127  vtkSetVector3Macro(Point, double);
128  vtkGetVectorMacro(Point, double, 3);
130 
132 
137  vtkSetVector3Macro(Ray, double);
138  vtkGetVectorMacro(Ray, double, 3);
140 
142 
146  vtkSetVector3Macro(Normal, double);
147  vtkGetVectorMacro(Normal, double, 3);
149 
153  vtkMTimeType GetMTime() override;
154 
155 protected:
157  ~vtkSphereTreeFilter() override;
158 
162  int Level;
163  double Point[3];
164  double Ray[3];
165  double Normal[3];
166 
168  int FillInputPortInformation(int port, vtkInformation* info) override;
169 
170 private:
171  vtkSphereTreeFilter(const vtkSphereTreeFilter&) = delete;
172  void operator=(const vtkSphereTreeFilter&) = delete;
173 };
174 
175 #endif
void SetExtractionModeToLine()
Specify what information this filter is to extract from the sphere tree.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_SPHERE_TREE_PLANE
represent a sphere tree as vtkPolyData
void SetExtractionModeToPoint()
Specify what information this filter is to extract from the sphere tree.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetExtractionModeToPlane()
Specify what information this filter is to extract from the sphere tree.
#define VTK_SPHERE_TREE_POINT
virtual vtkMTimeType GetMTime()
Return this object's modified time.
#define VTK_SHORT_MAX
Definition: vtkType.h:151
vtkSphereTree * SphereTree
#define VTK_SPHERE_TREE_LINE
class to build and traverse sphere trees
Definition: vtkSphereTree.h:72
#define VTK_SPHERE_TREE_LEVELS
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetExtractionModeToLevels()
Specify what information this filter is to extract from the sphere tree.