VTK  9.4.20241226
vtkSelectVisiblePoints.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
68#ifndef vtkSelectVisiblePoints_h
69#define vtkSelectVisiblePoints_h
70
72#include "vtkRenderingCoreModule.h" // For export macro
73
74VTK_ABI_NAMESPACE_BEGIN
75class vtkRenderer;
76class vtkMatrix4x4;
77
78class VTKRENDERINGCORE_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
79{
80public:
82 void PrintSelf(ostream& os, vtkIndent indent) override;
83
89
91
96 {
97 if (this->Renderer != ren)
98 {
99 this->Renderer = ren;
100 this->Modified();
101 }
102 }
103 vtkRenderer* GetRenderer() { return this->Renderer; }
105
107
111 vtkSetMacro(SelectionWindow, vtkTypeBool);
112 vtkGetMacro(SelectionWindow, vtkTypeBool);
113 vtkBooleanMacro(SelectionWindow, vtkTypeBool);
115
117
121 vtkSetVector4Macro(Selection, int);
122 vtkGetVectorMacro(Selection, int, 4);
124
126
130 vtkSetMacro(SelectInvisible, vtkTypeBool);
131 vtkGetMacro(SelectInvisible, vtkTypeBool);
132 vtkBooleanMacro(SelectInvisible, vtkTypeBool);
134
136
142 vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
143 vtkGetMacro(Tolerance, double);
145
147
154 vtkSetClampMacro(ToleranceWorld, double, 0.0, VTK_DOUBLE_MAX);
155 vtkGetMacro(ToleranceWorld, double);
157
162 float* Initialize(bool getZbuff);
163
168 bool IsPointOccluded(const double x[3], const float* zPtr);
169
174
175protected:
178
180 int FillInputPortInformation(int port, vtkInformation* info) override;
181
184
186 int Selection[4];
187 int InternalSelection[4];
189 double DirectionOfProjection[3];
190 double Tolerance;
192
193private:
195 void operator=(const vtkSelectVisiblePoints&) = delete;
196};
197
198VTK_ABI_NAMESPACE_END
199#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Superclass for algorithms that produce only polydata as output.
abstract specification for renderers
extract points that are visible (based on z-buffer calculation)
vtkMatrix4x4 * CompositePerspectiveTransform
~vtkSelectVisiblePoints() override
void SetRenderer(vtkRenderer *ren)
Specify the renderer in which the visibility computation is to be performed.
vtkMTimeType GetMTime() override
Return MTime also considering the renderer.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkRenderer * GetRenderer()
Specify the renderer in which the visibility computation is to be performed.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkSelectVisiblePoints * New()
Instantiate object with no renderer; window selection turned off; tolerance set to 0....
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
float * Initialize(bool getZbuff)
Requires the renderer to be set.
bool IsPointOccluded(const double x[3], const float *zPtr)
Tests if a point x is being occluded or not against the Z-Buffer array passed in by zPtr.
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_DOUBLE_MAX
Definition vtkType.h:154