VTK  9.3.0
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
39#ifndef vtkSelectVisiblePoints_h
40#define vtkSelectVisiblePoints_h
41
43#include "vtkRenderingCoreModule.h" // For export macro
44
45VTK_ABI_NAMESPACE_BEGIN
46class vtkRenderer;
47class vtkMatrix4x4;
48
49class VTKRENDERINGCORE_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
50{
51public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
60
62
67 {
68 if (this->Renderer != ren)
69 {
70 this->Renderer = ren;
71 this->Modified();
72 }
73 }
74 vtkRenderer* GetRenderer() { return this->Renderer; }
76
78
82 vtkSetMacro(SelectionWindow, vtkTypeBool);
83 vtkGetMacro(SelectionWindow, vtkTypeBool);
84 vtkBooleanMacro(SelectionWindow, vtkTypeBool);
86
88
92 vtkSetVector4Macro(Selection, int);
93 vtkGetVectorMacro(Selection, int, 4);
95
97
101 vtkSetMacro(SelectInvisible, vtkTypeBool);
102 vtkGetMacro(SelectInvisible, vtkTypeBool);
103 vtkBooleanMacro(SelectInvisible, vtkTypeBool);
105
107
113 vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
114 vtkGetMacro(Tolerance, double);
116
118
125 vtkSetClampMacro(ToleranceWorld, double, 0.0, VTK_DOUBLE_MAX);
126 vtkGetMacro(ToleranceWorld, double);
128
133 float* Initialize(bool getZbuff);
134
139 bool IsPointOccluded(const double x[3], const float* zPtr);
140
145
146protected:
149
151 int FillInputPortInformation(int port, vtkInformation* info) override;
152
155
157 int Selection[4];
158 int InternalSelection[4];
160 double DirectionOfProjection[3];
161 double Tolerance;
163
164private:
166 void operator=(const vtkSelectVisiblePoints&) = delete;
167};
168
169VTK_ABI_NAMESPACE_END
170#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
virtual void Modified()
Update the modification time for this object.
Superclass for algorithms that produce only polydata as output.
abstract specification for renderers
Definition vtkRenderer.h:59
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