VTK  9.0.1
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 =========================================================================*/
41 #ifndef vtkSphereTreeFilter_h
42 #define vtkSphereTreeFilter_h
43 
44 #include "vtkFiltersCoreModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 #define VTK_SPHERE_TREE_LEVELS 0
48 #define VTK_SPHERE_TREE_POINT 1
49 #define VTK_SPHERE_TREE_LINE 2
50 #define VTK_SPHERE_TREE_PLANE 3
51 
52 class vtkSphereTree;
53 
54 class VTKFILTERSCORE_EXPORT vtkSphereTreeFilter : public vtkPolyDataAlgorithm
55 {
56 public:
60  static vtkSphereTreeFilter* New();
61 
63 
67  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
74  virtual void SetSphereTree(vtkSphereTree*);
75  vtkGetObjectMacro(SphereTree, vtkSphereTree);
77 
79 
87  vtkSetMacro(ExtractionMode, int);
88  vtkGetMacro(ExtractionMode, int);
89  void SetExtractionModeToLevels() { this->SetExtractionMode(VTK_SPHERE_TREE_LEVELS); }
90  void SetExtractionModeToPoint() { this->SetExtractionMode(VTK_SPHERE_TREE_POINT); }
91  void SetExtractionModeToLine() { this->SetExtractionMode(VTK_SPHERE_TREE_LINE); }
92  void SetExtractionModeToPlane() { this->SetExtractionMode(VTK_SPHERE_TREE_PLANE); }
93  const char* GetExtractionModeAsString();
95 
97 
102  vtkSetMacro(TreeHierarchy, bool);
103  vtkGetMacro(TreeHierarchy, bool);
104  vtkBooleanMacro(TreeHierarchy, bool);
106 
108 
115  vtkSetClampMacro(Level, int, -1, VTK_SHORT_MAX);
116  vtkGetMacro(Level, int);
118 
120 
124  vtkSetVector3Macro(Point, double);
125  vtkGetVectorMacro(Point, double, 3);
127 
129 
134  vtkSetVector3Macro(Ray, double);
135  vtkGetVectorMacro(Ray, double, 3);
137 
139 
143  vtkSetVector3Macro(Normal, double);
144  vtkGetVectorMacro(Normal, double, 3);
146 
150  vtkMTimeType GetMTime() override;
151 
152 protected:
154  ~vtkSphereTreeFilter() override;
155 
159  int Level;
160  double Point[3];
161  double Ray[3];
162  double Normal[3];
163 
165  int FillInputPortInformation(int port, vtkInformation* info) override;
166 
167 private:
168  vtkSphereTreeFilter(const vtkSphereTreeFilter&) = delete;
169  void operator=(const vtkSphereTreeFilter&) = delete;
170 };
171 
172 #endif
vtkSphereTreeFilter::TreeHierarchy
bool TreeHierarchy
Definition: vtkSphereTreeFilter.h:157
vtkSphereTreeFilter::Level
int Level
Definition: vtkSphereTreeFilter.h:159
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkX3D::Normal
@ Normal
Definition: vtkX3D.h:51
VTK_SPHERE_TREE_PLANE
#define VTK_SPHERE_TREE_PLANE
Definition: vtkSphereTreeFilter.h:50
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
VTK_SPHERE_TREE_POINT
#define VTK_SPHERE_TREE_POINT
Definition: vtkSphereTreeFilter.h:48
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
VTK_SHORT_MAX
#define VTK_SHORT_MAX
Definition: vtkType.h:151
vtkSphereTreeFilter::SetExtractionModeToPoint
void SetExtractionModeToPoint()
Definition: vtkSphereTreeFilter.h:90
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSphereTreeFilter::ExtractionMode
int ExtractionMode
Definition: vtkSphereTreeFilter.h:158
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkSphereTree
class to build and traverse sphere trees
Definition: vtkSphereTree.h:69
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkSphereTreeFilter::SetExtractionModeToLevels
void SetExtractionModeToLevels()
Definition: vtkSphereTreeFilter.h:89
vtkSphereTreeFilter
represent a sphere tree as vtkPolyData
Definition: vtkSphereTreeFilter.h:54
vtkSphereTreeFilter::SetExtractionModeToLine
void SetExtractionModeToLine()
Definition: vtkSphereTreeFilter.h:91
vtkSphereTreeFilter::SphereTree
vtkSphereTree * SphereTree
Definition: vtkSphereTreeFilter.h:156
VTK_SPHERE_TREE_LINE
#define VTK_SPHERE_TREE_LINE
Definition: vtkSphereTreeFilter.h:49
VTK_SPHERE_TREE_LEVELS
#define VTK_SPHERE_TREE_LEVELS
Definition: vtkSphereTreeFilter.h:47
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkSphereTreeFilter::SetExtractionModeToPlane
void SetExtractionModeToPlane()
Definition: vtkSphereTreeFilter.h:92
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41