VTK  9.3.20240419
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 
71 #include "vtkPolyDataAlgorithm.h"
72 #include "vtkRenderingCoreModule.h" // For export macro
73 
74 VTK_ABI_NAMESPACE_BEGIN
75 class vtkRenderer;
76 class vtkMatrix4x4;
77 
78 class VTKRENDERINGCORE_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
79 {
80 public:
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 
173  vtkMTimeType GetMTime() override;
174 
175 protected:
178 
181 
184 
186  int Selection[4];
187  int InternalSelection[4];
189  double DirectionOfProjection[3];
190  double Tolerance;
192 
193 private:
195  void operator=(const vtkSelectVisiblePoints&) = delete;
196 };
197 
198 VTK_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
Definition: vtkMatrix4x4.h:141
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:172
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.
static vtkSelectVisiblePoints * New()
Instantiate object with no renderer; window selection turned off; tolerance set to 0....
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
float * Initialize(bool getZbuff)
Requires the renderer to be set.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRenderer * GetRenderer()
Specify the renderer in which the visibility computation is to be performed.
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.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154