ParaView
vtkPVView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVView.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 =========================================================================*/
26 #ifndef vtkPVView_h
27 #define vtkPVView_h
28 
29 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
30 #include "vtkView.h"
31 
32 class vtkInformation;
33 class vtkInformationObjectBaseKey;
34 class vtkInformationRequestKey;
35 class vtkInformationVector;
37 
38 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVView : public vtkView
39 {
40 public:
41  vtkTypeMacro(vtkPVView, vtkView);
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
44  static void SetEnableStreaming(bool);
45  static bool GetEnableStreaming();
46 
47  enum
48  {
49  ViewTimeChangedEvent = 9000
50  };
51 
57  virtual void Initialize(unsigned int id);
58 
60 
65  virtual void SetPosition(int, int);
66  vtkGetVector2Macro(Position, int);
68 
70 
75  virtual void SetSize(int, int);
76  vtkGetVector2Macro(Size, int);
78 
83  virtual void StillRender() = 0;
84 
90  virtual void InteractiveRender() = 0;
91 
93 
103  bool SynchronizeBounds(double bounds[6]);
104  bool SynchronizeSize(double& size);
105  bool SynchronizeSize(unsigned int& size);
107 
109 
114  virtual void SetViewTime(double value);
115  vtkGetMacro(ViewTime, double);
117 
119 
126  vtkSetMacro(CacheKey, double);
127  vtkGetMacro(CacheKey, double);
129 
131 
135  vtkSetMacro(UseCache, bool);
136  vtkGetMacro(UseCache, bool);
138 
140 
143  virtual void PrepareForScreenshot();
144  virtual void CleanupAfterScreenshot();
146 
152  static vtkInformationObjectBaseKey* VIEW();
153 
160  static vtkInformationRequestKey* REQUEST_UPDATE();
161 
167  static vtkInformationRequestKey* REQUEST_UPDATE_LOD();
168 
174  static vtkInformationRequestKey* REQUEST_RENDER();
175 
180  virtual void Update();
181 
185  bool InTileDisplayMode();
186 
191  bool InCaveDisplayMode();
192 
205  bool GetLocalProcessSupportsInteraction();
206 
207  vtkGetMacro(Identifier, unsigned int);
208 
209 protected:
210  vtkPVView();
211  ~vtkPVView();
212 
219  virtual void AddRepresentationInternal(vtkDataRepresentation* rep);
220 
221  // vtkPVSynchronizedRenderWindows is used to ensure that this view participates
222  // in tile-display configurations. Even if your view subclass a simple
223  // Qt-based client-side view that does not render anything on the
224  // tile-display, it needs to be "registered with the
225  // vtkPVSynchronizedRenderWindows so that the layout on the tile-displays for
226  // other views shows up correctly. Ideally you'd want to paste some image on
227  // the tile-display, maybe just a capture of the image rendering on the
228  // client.
229  // If your view needs a vtkRenderWindow, don't directly create it, always get
230  // using vtkPVSynchronizedRenderWindows::NewRenderWindow().
232 
237  unsigned int Identifier;
238 
240 
245  vtkInformation* RequestInformation;
246  vtkInformationVector* ReplyInformationVector;
248 
250 
253  void CallProcessViewRequest(
254  vtkInformationRequestKey* passType, vtkInformation* request, vtkInformationVector* reply);
255  double ViewTime;
257 
258  double CacheKey;
259  bool UseCache;
260 
261  int Size[2];
262  int Position[2];
263 
264 private:
265  vtkPVView(const vtkPVView&) VTK_DELETE_FUNCTION;
266  void operator=(const vtkPVView&) VTK_DELETE_FUNCTION;
267 
268  class vtkInternals;
269 
270  bool ViewTimeValid;
271  bool LastRenderOneViewAtATime;
272 
273  static bool EnableStreaming;
274 };
275 
276 #endif
unsigned int Identifier
Every view gets a unique identifier that it uses to register itself with the SynchronizedWindows.
Definition: vtkPVView.h:237
vtkPVSynchronizedRenderWindows * SynchronizedWindows
Definition: vtkPVView.h:231
vtkInformation * RequestInformation
These are passed as arguments to vtkDataRepresentation::ProcessViewRequest().
Definition: vtkPVView.h:245
baseclass for all ParaView views.
Definition: vtkPVView.h:38
synchronizes render-windows among processes in ParaView configurations.
vtkInformationVector * ReplyInformationVector
These are passed as arguments to vtkDataRepresentation::ProcessViewRequest().
Definition: vtkPVView.h:246
bool UseCache
Definition: vtkPVView.h:259
double ViewTime
Subclasses can use this method to trigger a pass on all representations.
Definition: vtkPVView.h:255
double CacheKey
Definition: vtkPVView.h:258