This file is indexed.

/usr/include/paraview/vtkPVSynchronizedRenderWindows.h is in paraview-dev 5.0.1+dfsg1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
/*=========================================================================

  Program:   ParaView
  Module:    vtkPVSynchronizedRenderWindows.h

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkPVSynchronizedRenderWindows - synchronizes render-windows among
// processes in ParaView configurations.
// .SECTION Description
// vtkPVSynchronizedRenderWindows is the class used to synchronize render
// windows in ParaView. This class can be instantiated on all processes in all
// modes, it automatically discovers the configuration and adapts its behavior
// accordingly. The role of this class is to set up the render windows on all
// processes and then synchronize renders. It does not manage compositing or
// image delivery. All it does is synchronize render windows and their layouts
// among processes.
//
// If the application is managing calling of vtkRenderWindow::Render() on all
// processes, then one should disable RenderEventPropagation flag.

#ifndef vtkPVSynchronizedRenderWindows_h
#define vtkPVSynchronizedRenderWindows_h

#include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
#include "vtkObject.h"
#include "vtkMultiProcessController.h" // for vtkRMIFunctionType
#include "vtkWeakPointer.h" // for vtkWeakPointer.

class vtkDataObject;
class vtkMultiProcessController;
class vtkMultiProcessStream;
class vtkPVSession;
class vtkRenderer;
class vtkRenderWindow;
class vtkSelection;

class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVSynchronizedRenderWindows : public vtkObject
{
public:
  // Description:
  // if session==NULL, then active session is used. If no active session is
  // present, then it's a critical error and this method will return NULL.
  static vtkPVSynchronizedRenderWindows* New(vtkPVSession* session=NULL);

  vtkTypeMacro(vtkPVSynchronizedRenderWindows, vtkObject);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Returns a render window for use (possibly new).
  virtual vtkRenderWindow* NewRenderWindow();

  // Description:
  // Register/UnRegister a window.
  virtual void AddRenderWindow(unsigned int id, vtkRenderWindow*);
  virtual void RemoveRenderWindow(unsigned int id);
  vtkRenderWindow* GetRenderWindow(unsigned int id);

  // Description:
  // Register/UnRegister the renderers. One can add multiple renderers for the
  // same id. The id must be same as that specified when adding the
  // corresponding render window.
  virtual void AddRenderer(unsigned int id, vtkRenderer*);
  virtual void RemoveAllRenderers(unsigned int id);
  virtual void AddRenderer(unsigned int id, vtkRenderer*, const double viewport[4]);
  virtual bool UpdateRendererViewport(unsigned int id, vtkRenderer*, const double viewport[4]);

  // Description:
  // The views are not supposed to updated the render window position or size
  // directly. They should always go through this API to update the window sizes
  // and positions. This makes it possible to provide a consistent API
  // irrespective of the mode ParaView is running in.
  // These methods only need to be called on the "driver" node. (No harm in
  // calling on all nodes). By driver node, we mean the CLIENT in
  // client-server mode and the root node in batch mode.
  virtual void SetWindowSize(unsigned int id, int width, int height);
  virtual void SetWindowPosition(unsigned int id, int posx, int posy);
  virtual const int* GetWindowSize(unsigned int id);
  virtual const int* GetWindowPosition(unsigned int id);

  // Description:
  // Enable/Disable parallel rendering.
  vtkSetMacro(Enabled, bool);
  vtkGetMacro(Enabled, bool);
  vtkBooleanMacro(Enabled, bool);

  // Description:
  // Enable/Disable propagation of the render event. This is typically true,
  // unless the application is managing calling Render() on all processes
  // involved.
  vtkSetMacro(RenderEventPropagation, bool);
  vtkGetMacro(RenderEventPropagation, bool);
  vtkBooleanMacro(RenderEventPropagation, bool);

  // Description:
  // This method returns true if the local process is the 'driver' process. In
  // client-server configurations, client is the driver. In batch
  // configurations, root-node is the driver. In built-in mode, this always
  // returns true.
  bool GetLocalProcessIsDriver();

  // Description:
  // vtkPVSynchronizedRenderWindows encapsulates a whole lot of logic for
  // communication between processes. Given the ton of information this class
  // keeps, it can easily aid vtkViews to synchronize information such as bounds/
  // data-size among all processes efficiently. This can be achieved by using
  // these methods.
  // Note that these methods should be called on all processes at the same time
  // otherwise we will have deadlocks.
  // We may make this API generic in future, for now this works.
  bool SynchronizeBounds(double bounds[6]);
  bool SynchronizeSize(double &size);
  bool SynchronizeSize(unsigned int &size);
  bool BroadcastToDataServer(vtkSelection* selection);
  bool BroadcastToRenderServer(vtkDataObject*);

  enum StandardOperations
    {
    MAX_OP = vtkCommunicator::MAX_OP,
    MIN_OP = vtkCommunicator::MIN_OP,
    SUM_OP = vtkCommunicator::SUM_OP
    };
  bool Reduce(vtkIdType& value, StandardOperations operation);

  // Description:
  // Convenience method to trigger an RMI call from the client/root node.
  void TriggerRMI(vtkMultiProcessStream& stream, int tag);
  unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
  bool RemoveRMICallback(unsigned long id);

//BTX
  enum
    {
    SYNC_MULTI_RENDER_WINDOW_TAG = 15002,
    GET_ZBUFFER_VALUE_TAG = 15003,
    SYNC_TILE_DISPLAY_PARAMATERS = 15004
    };

  // Internal-callback-method
  void Render(unsigned int);
  void OnGetZBufferValue(unsigned int, int, int);

  // Description:
  vtkGetObjectMacro(ParallelController, vtkMultiProcessController);
  vtkGetObjectMacro(ClientServerController, vtkMultiProcessController);
  vtkGetObjectMacro(ClientDataServerController, vtkMultiProcessController);

  // Description:
  // By default, this class uses the same render window for all views on the
  // server processes and then arranges the renderers by adjusting their
  // viewports. However, this does not work well when doing image capture with
  // magnification. In those cases, you can force this class to simply render
  // the active view as the sole view in the window on the server side by
  // setting this flag to true.
  vtkSetMacro(RenderOneViewAtATime, bool);
  vtkGetMacro(RenderOneViewAtATime, bool);
  vtkBooleanMacro(RenderOneViewAtATime, bool);

  // Description:
  // Called before starting render. This is needed in batch mode since all views
  // share the same render window.
  void BeginRender(unsigned int id);

  // Description:
  // Returns true when in Cave mode.
  bool GetIsInCave();

  // Description:
  // This method should only be called on RENDER_SERVER or BATCH processes.
  // Returns true if in tile display mode and fills up tile_dims with the tile
  // dimensions.
  bool GetTileDisplayParameters(int tile_dims[2], int tile_mullions[2]);

  // Description:
  // Returns the z-buffer value at the given location. \c id is the view id
  // used in AddRenderWindow()/AddRenderer() etc.
  // @CallOnClientOnly
  double GetZbufferDataAtPoint(int x, int y, unsigned int id);

  enum ModeEnum
    {
    INVALID,
    BUILTIN,
    CLIENT,
    RENDER_SERVER,
    DATA_SERVER,
    BATCH
    };

  // Description:
  // Streaming uses this class as a conduit for messaging.
  // Need mode to use it correctly.
  ModeEnum GetMode() { return this->Mode; };

  // Description:
  // Provides access to the session.
  vtkPVSession* GetSession();

protected:
  vtkPVSynchronizedRenderWindows(vtkPVSession*);
  ~vtkPVSynchronizedRenderWindows();

  // Description:
  // Set/Get the controller used for communication among parallel processes.
  void SetParallelController(vtkMultiProcessController*);

  // Description:
  // Set/Get the controller used for client-server communication.
  void SetClientServerController(vtkMultiProcessController*);

  // Description:
  // Set/Get the controller used for client-data-server communication.
  void SetClientDataServerController(vtkMultiProcessController*);

  // Description:
  // Saves the information about all the windows known to this class and how
  // they are laid out. For this to work as expected, it is essential that the
  // client sets the WindowSize and WindowPosition correctly for all the render
  // windows using the API on this class. It also saves some information about
  // the active render window.
  void SaveWindowAndLayout(vtkRenderWindow*, vtkMultiProcessStream& stream);
  void LoadWindowAndLayout(vtkRenderWindow*, vtkMultiProcessStream& stream);

  // Description:
  // Using the meta-data saved about the render-windows and their positions and
  // sizes, this updates the renderers/window-sizes etc. This have different
  // response on different processes types.
  void UpdateWindowLayout();

  // Description:
  // Ensures that only the renderer assigned to the given id are enabled, all
  // others are disabled. This is especially necessary on processes where the
  // render window is shared.
  void UpdateRendererDrawStates(unsigned int id);

  // These methods are called on all processes as a consequence of corresponding
  // events being called on the render window.
  virtual void HandleStartRender(vtkRenderWindow*);
  virtual void HandleEndRender(vtkRenderWindow*);
  virtual void HandleAbortRender(vtkRenderWindow*) {}

  virtual void ClientStartRender(vtkRenderWindow*);
  virtual void RootStartRender(vtkRenderWindow*);
  virtual void SatelliteStartRender(vtkRenderWindow*);

  // Description:
  // Shrinks gaps between views, rather grows the views to reduce gaps. Only
  // used in tile-display mode to avoid gaps on the server side.
  void ShinkGaps();


  ModeEnum Mode;
  vtkMultiProcessController* ParallelController;
  vtkMultiProcessController* ClientServerController;
  vtkMultiProcessController* ClientDataServerController;
  unsigned long ClientServerRMITag;
  unsigned long ClientServerGetZBufferValueRMITag;
  unsigned long ParallelRMITag;
  bool Enabled;
  bool RenderEventPropagation;
  bool RenderOneViewAtATime;

  vtkWeakPointer<vtkPVSession> Session;

private:
  vtkPVSynchronizedRenderWindows(const vtkPVSynchronizedRenderWindows&); // Not implemented
  void operator=(const vtkPVSynchronizedRenderWindows&); // Not implemented

  class vtkInternals;
  vtkInternals* Internals;

  class vtkObserver;
  vtkObserver* Observer;


  template <class T>
  bool ReduceTemplate(T &size, StandardOperations operation);
//ETX
};

#endif

// VTK-HeaderTest-Exclude: vtkPVSynchronizedRenderWindows.h