ParaView
vtkPVHardwareSelector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVHardwareSelector.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
28 #ifndef vtkPVHardwareSelector_h
29 #define vtkPVHardwareSelector_h
30 
31 #include "vtkOpenGLHardwareSelector.h"
32 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
33 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
34 
36 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVHardwareSelector : public vtkOpenGLHardwareSelector
37 {
38 public:
39  static vtkPVHardwareSelector* New();
40  vtkTypeMacro(vtkPVHardwareSelector, vtkOpenGLHardwareSelector);
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
46  vtkSelection* Select(int region[4]);
47 
52  vtkSelection* PolygonSelect(int* polygonPoints, vtkIdType count);
53 
58  virtual bool NeedToRenderForSelection();
59 
63  void InvalidateCachedSelection() { this->Modified(); }
64 
65  int AssignUniqueId(vtkProp*);
66 
71  void SetSynchronizedWindows(vtkPVSynchronizedRenderWindows*);
72 
73  // Fixes a -Woverloaded-virtual warning.
74  using vtkOpenGLHardwareSelector::BeginRenderProp;
78  void BeginRenderProp(vtkRenderWindow*);
79 
80 protected:
83 
87  virtual int GetPropID(int idx, vtkProp* prop);
88 
95  virtual bool PassRequired(int pass);
96 
101  bool PrepareSelect();
102 
103  virtual void SavePixelBuffer(int passNo);
104 
105  vtkTimeStamp CaptureTime;
106  int UniqueId;
107  vtkWeakPointer<vtkPVSynchronizedRenderWindows> SynchronizedWindows;
108 
109 private:
110  vtkPVHardwareSelector(const vtkPVHardwareSelector&) VTK_DELETE_FUNCTION;
111  void operator=(const vtkPVHardwareSelector&) VTK_DELETE_FUNCTION;
112 
113  class vtkInternals;
114  vtkInternals* Internals;
115 };
116 
117 #endif
vtkHardwareSelector subclass with paraview sepecific logic to avoid recapturing buffers unless needed...
synchronizes render-windows among processes in ParaView configurations.
void InvalidateCachedSelection()
Called to invalidate the cache.
vtkWeakPointer< vtkPVSynchronizedRenderWindows > SynchronizedWindows