VTK  9.2.5
vtkSelectVisiblePoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSelectVisiblePoints.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
80 #ifndef vtkSelectVisiblePoints_h
81 #define vtkSelectVisiblePoints_h
82 
83 #include "vtkPolyDataAlgorithm.h"
84 #include "vtkRenderingCoreModule.h" // For export macro
85 
86 class vtkRenderer;
87 class vtkMatrix4x4;
88 
89 class VTKRENDERINGCORE_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
90 {
91 public:
93  void PrintSelf(ostream& os, vtkIndent indent) override;
94 
100 
102 
107  {
108  if (this->Renderer != ren)
109  {
110  this->Renderer = ren;
111  this->Modified();
112  }
113  }
114  vtkRenderer* GetRenderer() { return this->Renderer; }
116 
118 
122  vtkSetMacro(SelectionWindow, vtkTypeBool);
123  vtkGetMacro(SelectionWindow, vtkTypeBool);
124  vtkBooleanMacro(SelectionWindow, vtkTypeBool);
126 
128 
132  vtkSetVector4Macro(Selection, int);
133  vtkGetVectorMacro(Selection, int, 4);
135 
137 
141  vtkSetMacro(SelectInvisible, vtkTypeBool);
142  vtkGetMacro(SelectInvisible, vtkTypeBool);
143  vtkBooleanMacro(SelectInvisible, vtkTypeBool);
145 
147 
153  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
154  vtkGetMacro(Tolerance, double);
156 
158 
165  vtkSetClampMacro(ToleranceWorld, double, 0.0, VTK_DOUBLE_MAX);
166  vtkGetMacro(ToleranceWorld, double);
168 
173  float* Initialize(bool getZbuff);
174 
179  bool IsPointOccluded(const double x[3], const float* zPtr);
180 
184  vtkMTimeType GetMTime() override;
185 
186 protected:
189 
192 
195 
197  int Selection[4];
198  int InternalSelection[4];
200  double DirectionOfProjection[3];
201  double Tolerance;
203 
204 private:
206  void operator=(const vtkSelectVisiblePoints&) = delete;
207 };
208 
209 #endif
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:151
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:182
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:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165