VTK  9.0.1
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 =========================================================================*/
45 #ifndef vtkSelectVisiblePoints_h
46 #define vtkSelectVisiblePoints_h
47 
48 #include "vtkPolyDataAlgorithm.h"
49 #include "vtkRenderingCoreModule.h" // For export macro
50 
51 class vtkRenderer;
52 class vtkMatrix4x4;
53 
54 class VTKRENDERINGCORE_EXPORT vtkSelectVisiblePoints : public vtkPolyDataAlgorithm
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
64  static vtkSelectVisiblePoints* New();
65 
67 
72  {
73  if (this->Renderer != ren)
74  {
75  this->Renderer = ren;
76  this->Modified();
77  }
78  }
79  vtkRenderer* GetRenderer() { return this->Renderer; }
81 
83 
87  vtkSetMacro(SelectionWindow, vtkTypeBool);
88  vtkGetMacro(SelectionWindow, vtkTypeBool);
89  vtkBooleanMacro(SelectionWindow, vtkTypeBool);
91 
93 
97  vtkSetVector4Macro(Selection, int);
98  vtkGetVectorMacro(Selection, int, 4);
100 
102 
106  vtkSetMacro(SelectInvisible, vtkTypeBool);
107  vtkGetMacro(SelectInvisible, vtkTypeBool);
108  vtkBooleanMacro(SelectInvisible, vtkTypeBool);
110 
112 
118  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
119  vtkGetMacro(Tolerance, double);
121 
123 
130  vtkSetClampMacro(ToleranceWorld, double, 0.0, VTK_DOUBLE_MAX);
131  vtkGetMacro(ToleranceWorld, double);
133 
138  float* Initialize(bool getZbuff);
139 
144  bool IsPointOccluded(const double x[3], const float* zPtr);
145 
149  vtkMTimeType GetMTime() override;
150 
151 protected:
153  ~vtkSelectVisiblePoints() override;
154 
156  int FillInputPortInformation(int port, vtkInformation* info) override;
157 
160 
162  int Selection[4];
163  int InternalSelection[4];
165  double DirectionOfProjection[3];
166  double Tolerance;
168 
169 private:
171  void operator=(const vtkSelectVisiblePoints&) = delete;
172 };
173 
174 #endif
vtkSelectVisiblePoints::SelectInvisible
vtkTypeBool SelectInvisible
Definition: vtkSelectVisiblePoints.h:164
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSelectVisiblePoints::SetRenderer
void SetRenderer(vtkRenderer *ren)
Specify the renderer in which the visibility computation is to be performed.
Definition: vtkSelectVisiblePoints.h:71
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkSelectVisiblePoints::Renderer
vtkRenderer * Renderer
Definition: vtkSelectVisiblePoints.h:158
vtkSelectVisiblePoints::ToleranceWorld
double ToleranceWorld
Definition: vtkSelectVisiblePoints.h:167
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkSelectVisiblePoints::CompositePerspectiveTransform
vtkMatrix4x4 * CompositePerspectiveTransform
Definition: vtkSelectVisiblePoints.h:159
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkSelectVisiblePoints::Tolerance
double Tolerance
Definition: vtkSelectVisiblePoints.h:166
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkSelectVisiblePoints
extract points that are visible (based on z-buffer calculation)
Definition: vtkSelectVisiblePoints.h:54
vtkSelectVisiblePoints::GetRenderer
vtkRenderer * GetRenderer()
Definition: vtkSelectVisiblePoints.h:79
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41
vtkSelectVisiblePoints::SelectionWindow
vtkTypeBool SelectionWindow
Definition: vtkSelectVisiblePoints.h:161