VTK  9.7.1
vtkSphereTreeFilter.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
32 #ifndef vtkSphereTreeFilter_h
33 #define vtkSphereTreeFilter_h
34 
35 #include "vtkFiltersCoreModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
38 
39 #define VTK_SPHERE_TREE_LEVELS 0
40 #define VTK_SPHERE_TREE_POINT 1
41 #define VTK_SPHERE_TREE_LINE 2
42 #define VTK_SPHERE_TREE_PLANE 3
43 
44 VTK_ABI_NAMESPACE_BEGIN
45 class vtkSphereTree;
46 
47 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkSphereTreeFilter : public vtkPolyDataAlgorithm
48 {
49 public:
53  static vtkSphereTreeFilter* New();
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
67  virtual void SetSphereTree(vtkSphereTree*);
68  vtkGetObjectMacro(SphereTree, vtkSphereTree);
70 
72 
80  vtkSetMacro(ExtractionMode, int);
81  vtkGetMacro(ExtractionMode, int);
82  void SetExtractionModeToLevels() { this->SetExtractionMode(VTK_SPHERE_TREE_LEVELS); }
83  void SetExtractionModeToPoint() { this->SetExtractionMode(VTK_SPHERE_TREE_POINT); }
84  void SetExtractionModeToLine() { this->SetExtractionMode(VTK_SPHERE_TREE_LINE); }
85  void SetExtractionModeToPlane() { this->SetExtractionMode(VTK_SPHERE_TREE_PLANE); }
86  const char* GetExtractionModeAsString();
88 
90 
95  vtkSetMacro(TreeHierarchy, bool);
96  vtkGetMacro(TreeHierarchy, bool);
97  vtkBooleanMacro(TreeHierarchy, bool);
99 
101 
108  vtkSetClampMacro(Level, int, -1, VTK_SHORT_MAX);
109  vtkGetMacro(Level, int);
111 
113 
117  vtkSetVector3Macro(Point, double);
118  vtkGetVectorMacro(Point, double, 3);
120 
122 
127  vtkSetVector3Macro(Ray, double);
128  vtkGetVectorMacro(Ray, double, 3);
130 
132 
136  vtkSetVector3Macro(Normal, double);
137  vtkGetVectorMacro(Normal, double, 3);
139 
143  vtkMTimeType GetMTime() override;
144 
145 protected:
147  ~vtkSphereTreeFilter() override;
148 
152  int Level;
153  double Point[3];
154  double Ray[3];
155  double Normal[3];
156 
158  int FillInputPortInformation(int port, vtkInformation* info) override;
159 
160  void ReportReferences(vtkGarbageCollector*) override;
161 
162 private:
163  vtkSphereTreeFilter(const vtkSphereTreeFilter&) = delete;
164  void operator=(const vtkSphereTreeFilter&) = delete;
165 };
166 
167 VTK_ABI_NAMESPACE_END
168 #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:318
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void ReportReferences(vtkGarbageCollector *) override
#define VTK_SPHERE_TREE_PLANE
Detect and break reference loops.
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:28
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:188
vtkSphereTree * SphereTree
#define VTK_SPHERE_TREE_LINE
class to build and traverse sphere trees
Definition: vtkSphereTree.h:61
#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.
#define VTK_MARSHALAUTO
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.