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
48 #ifndef vtkSelectVisiblePoints_h
49 #define vtkSelectVisiblePoints_h
50 
51 #include "vtkPolyDataAlgorithm.h"
52 #include "vtkRenderingCoreModule.h" // For export macro
53 
54 VTK_ABI_NAMESPACE_BEGIN
55 class vtkRenderer;
56 class vtkMatrix4x4;
57 
58 class VTKRENDERINGCORE_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
59 {
60 public:
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
69 
71 
76  {
77  if (this->Renderer != ren)
78  {
79  this->Renderer = ren;
80  this->Modified();
81  }
82  }
83  vtkRenderer* GetRenderer() { return this->Renderer; }
85 
87 
91  vtkSetMacro(SelectionWindow, vtkTypeBool);
92  vtkGetMacro(SelectionWindow, vtkTypeBool);
93  vtkBooleanMacro(SelectionWindow, vtkTypeBool);
95 
97 
101  vtkSetVector4Macro(Selection, int);
102  vtkGetVectorMacro(Selection, int, 4);
104 
106 
110  vtkSetMacro(SelectInvisible, vtkTypeBool);
111  vtkGetMacro(SelectInvisible, vtkTypeBool);
112  vtkBooleanMacro(SelectInvisible, vtkTypeBool);
114 
116 
122  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
123  vtkGetMacro(Tolerance, double);
125 
127 
134  vtkSetClampMacro(ToleranceWorld, double, 0.0, VTK_DOUBLE_MAX);
135  vtkGetMacro(ToleranceWorld, double);
137 
142  float* Initialize(bool getZbuff);
143 
148  bool IsPointOccluded(const double x[3], const float* zPtr);
149 
153  vtkMTimeType GetMTime() override;
154 
155 protected:
158 
161 
164 
166  int Selection[4];
167  int InternalSelection[4];
169  double DirectionOfProjection[3];
170  double Tolerance;
172 
173 private:
175  void operator=(const vtkSelectVisiblePoints&) = delete;
176 };
177 
178 VTK_ABI_NAMESPACE_END
179 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
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:71
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