VTK: Filters/Core/vtkSphereTreeFilter.h Source File

| VTK 9.3.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
38 #define VTK_SPHERE_TREE_LEVELS 0
39 #define VTK_SPHERE_TREE_POINT 1
40 #define VTK_SPHERE_TREE_LINE 2
41 #define VTK_SPHERE_TREE_PLANE 3
42
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkSphereTree;
45
46 class VTKFILTERSCORE_EXPORT vtkSphereTreeFilter : public vtkPolyDataAlgorithm
47 {
48 public:
52 static vtkSphereTreeFilter* New();
53
55
58 vtkTypeMacro(vtkSphereTreeFilter, vtkPolyDataAlgorithm);
59 void PrintSelf(ostream& os, vtkIndent indent) override;
61
63
66 virtual void SetSphereTree(vtkSphereTree*);
67 vtkGetObjectMacro(SphereTree, vtkSphereTree);
69
71
79 vtkSetMacro(ExtractionMode, int);
80 vtkGetMacro(ExtractionMode, int);
81 void SetExtractionModeToLevels() { this->SetExtractionMode(VTK_SPHERE_TREE_LEVELS); }
82 void SetExtractionModeToPoint() { this->SetExtractionMode(VTK_SPHERE_TREE_POINT); }
83 void SetExtractionModeToLine() { this->SetExtractionMode(VTK_SPHERE_TREE_LINE); }
84 void SetExtractionModeToPlane() { this->SetExtractionMode(VTK_SPHERE_TREE_PLANE); }
85 const char* GetExtractionModeAsString();
87
89
94 vtkSetMacro(TreeHierarchy, bool);
95 vtkGetMacro(TreeHierarchy, bool);
96 vtkBooleanMacro(TreeHierarchy, bool);
98
100
107 vtkSetClampMacro(Level, int, -1, VTK_SHORT_MAX);
108 vtkGetMacro(Level, int);
110
112
116 vtkSetVector3Macro(Point, double);
117 vtkGetVectorMacro(Point, double, 3);
119
121
126 vtkSetVector3Macro(Ray, double);
127 vtkGetVectorMacro(Ray, double, 3);
129
131
135 vtkSetVector3Macro(Normal, double);
136 vtkGetVectorMacro(Normal, double, 3);
138
142 vtkMTimeType GetMTime() override;
143
144 protected:
145 vtkSphereTreeFilter();
146 ~vtkSphereTreeFilter() override;
147
148 vtkSphereTree* SphereTree;
149 bool TreeHierarchy;
150 int ExtractionMode;
151 int Level;
152 double Point[3];
153 double Ray[3];
154 double Normal[3];
155
156 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
157 int FillInputPortInformation(int port, vtkInformation* info) override;
158
159 private:
160 vtkSphereTreeFilter(const vtkSphereTreeFilter&) = delete;
161 void operator=(const vtkSphereTreeFilter&) = delete;
162 };
163
164 VTK_ABI_NAMESPACE_END
165 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkSphereTreeFilter
represent a sphere tree as vtkPolyData
Definition: vtkSphereTreeFilter.h:47
vtkSphereTreeFilter::SetExtractionModeToLine
void SetExtractionModeToLine()
Specify what information this filter is to extract from the sphere tree.
Definition: vtkSphereTreeFilter.h:83
vtkSphereTreeFilter::SetSphereTree
virtual void SetSphereTree(vtkSphereTree *)
Specify and retrieve the sphere tree.
vtkSphereTreeFilter::ExtractionMode
int ExtractionMode
Definition: vtkSphereTreeFilter.h:150
vtkSphereTreeFilter::vtkSphereTreeFilter
vtkSphereTreeFilter()
vtkSphereTreeFilter::New
static vtkSphereTreeFilter * New()
Instantiate the sphere tree filter.
vtkSphereTreeFilter::~vtkSphereTreeFilter
~vtkSphereTreeFilter() override
vtkSphereTreeFilter::SetExtractionModeToPlane
void SetExtractionModeToPlane()
Specify what information this filter is to extract from the sphere tree.
Definition: vtkSphereTreeFilter.h:84
vtkSphereTreeFilter::SphereTree
vtkSphereTree * SphereTree
Definition: vtkSphereTreeFilter.h:148
vtkSphereTreeFilter::SetExtractionModeToLevels
void SetExtractionModeToLevels()
Specify what information this filter is to extract from the sphere tree.
Definition: vtkSphereTreeFilter.h:81
vtkSphereTreeFilter::GetExtractionModeAsString
const char * GetExtractionModeAsString()
Specify what information this filter is to extract from the sphere tree.
vtkSphereTreeFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkSphereTreeFilter::Level
int Level
Definition: vtkSphereTreeFilter.h:151
vtkSphereTreeFilter::TreeHierarchy
bool TreeHierarchy
Definition: vtkSphereTreeFilter.h:149
vtkSphereTreeFilter::GetMTime
vtkMTimeType GetMTime() override
Modified GetMTime because the sphere tree may have changed.
vtkSphereTreeFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type related macros and PrintSelf() method.
vtkSphereTreeFilter::SetExtractionModeToPoint
void SetExtractionModeToPoint()
Specify what information this filter is to extract from the sphere tree.
Definition: vtkSphereTreeFilter.h:82
vtkSphereTreeFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSphereTree
class to build and traverse sphere trees
Definition: vtkSphereTree.h:62
vtkX3D::Normal
@ Normal
Definition: vtkX3D.h:45
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPolyDataAlgorithm.h
VTK_SPHERE_TREE_POINT
#define VTK_SPHERE_TREE_POINT
Definition: vtkSphereTreeFilter.h:39
VTK_SPHERE_TREE_LEVELS
#define VTK_SPHERE_TREE_LEVELS
Definition: vtkSphereTreeFilter.h:38
VTK_SPHERE_TREE_LINE
#define VTK_SPHERE_TREE_LINE
Definition: vtkSphereTreeFilter.h:40
VTK_SPHERE_TREE_PLANE
#define VTK_SPHERE_TREE_PLANE
Definition: vtkSphereTreeFilter.h:41
VTK_SHORT_MAX
#define VTK_SHORT_MAX
Definition: vtkType.h:140
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270