vtkPVRenderViewDataDeliveryManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVRenderViewDataDeliveryManager
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 =========================================================================*/
23 #ifndef vtkPVRenderViewDataDeliveryManager_h
24 #define vtkPVRenderViewDataDeliveryManager_h
25 
26 #include "vtkBoundingBox.h" // needed for iVar.
28 #include "vtkRemotingViewsModule.h" //needed for exports
29 #include "vtkSmartPointer.h" // needed for iVar.
30 #include "vtkTuple.h" // needed for vtkTuple.
31 #include "vtkWeakPointer.h" // needed for iVar.
32 
33 class vtkAlgorithmOutput;
34 class vtkDataObject;
36 class vtkInformation;
37 class vtkMatrix4x4;
39 class vtkPVView;
40 
41 #include <vector> // for std::vector
42 
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
57  void SetDeliverToAllProcesses(vtkPVDataRepresentation*, bool flag, bool low_res, int port = 0);
58 
69  void SetDeliverToClientAndRenderingProcesses(vtkPVDataRepresentation*, bool deliver_to_client,
70  bool gather_before_delivery, bool low_res, int port = 0);
71 
73 
81  void SetRedistributionMode(vtkPVDataRepresentation*, int mode, int port = 0);
82  void SetRedistributionModeToSplitBoundaryCells(vtkPVDataRepresentation* repr, int port = 0);
83  void SetRedistributionModeToDuplicateBoundaryCells(vtkPVDataRepresentation* repr, int port = 0);
84  void SetRedistributionModeToUniquelyAssignBoundaryCells(
85  vtkPVDataRepresentation* repr, int port = 0);
87 
92  void RedistributeDataForOrderedCompositing(bool use_lod);
93 
100  void ClearRedistributedData(bool use_load);
101 
106  void SetOrderedCompositingConfiguration(
107  vtkPVDataRepresentation* repr, int config, const double* bds, int port = 0);
108 
110 
113  void SetGeometryBounds(vtkPVDataRepresentation* repr, const double bds[6],
114  vtkMatrix4x4* matrix = nullptr, int port = 0);
115  vtkBoundingBox GetGeometryBounds(vtkPVDataRepresentation* repr, int port = 0);
116  vtkBoundingBox GetTransformedGeometryBounds(vtkPVDataRepresentation* repr, int port = 0);
118 
119  // *******************************************************************
120  // UNDER CONSTRUCTION STREAMING API
121  // *******************************************************************
122 
128  void SetStreamable(vtkPVDataRepresentation*, bool, int port = 0);
129 
131 
135  void SetNextStreamedPiece(vtkPVDataRepresentation* repr, vtkDataObject* piece, int port = 0);
136  vtkDataObject* GetCurrentStreamedPiece(vtkPVDataRepresentation* repr, int port = 0);
137  void ClearStreamedPieces();
139 
145  void DeliverStreamedPieces(unsigned int size, unsigned int* keys);
146 
151  bool GetRepresentationsReadyToStreamPieces(std::vector<unsigned int>& keys);
152 
154 
158  vtkGetMacro(UseRedistributedDataAsDeliveredData, bool);
159  vtkSetMacro(UseRedistributedDataAsDeliveredData, bool);
161 
162  int GetDeliveredDataKey(bool low_res) const override;
163 
165 
171  const std::vector<vtkBoundingBox>& GetCuts() const { return this->Cuts; }
172  vtkTimeStamp GetCutsMTime() const { return this->CutsMTime; }
174 
176 
186  const std::vector<vtkBoundingBox>& GetRawCuts() const { return this->RawCuts; }
187  const std::vector<int>& GetRawCutsRankAssignments() const { return this->RawCutsRankAssignments; }
189 
190 protected:
193 
194  void MoveData(vtkPVDataRepresentation* repr, bool low_res, int port) override;
195 
196  int GetViewDataDistributionMode(bool low_res) const;
197  int GetMoveMode(vtkInformation* info, int viewMode) const;
198 
199  std::vector<vtkBoundingBox> Cuts;
200  std::vector<vtkBoundingBox> RawCuts;
201  std::vector<int> RawCutsRankAssignments;
203 
206  bool UseRedistributedDataAsDeliveredData = false;
207 
208 private:
210  void operator=(const vtkPVRenderViewDataDeliveryManager&) = delete;
211 };
212 
213 #endif
manager for data-delivery.
const std::vector< vtkBoundingBox > & GetCuts() const
Provides access to the "cuts" built by this class when doing ordered compositing. ...
const std::vector< int > & GetRawCutsRankAssignments() const
When using an internally generated kd-tree for ordered compositing, this method provides access to th...
virtual int GetDeliveredDataKey(bool low_res) const
Views that support changing of which ranks do the rendering at runtime based on things like data size...
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
info
baseclass for all ParaView views.
Definition: vtkPVView.h:44
const std::vector< vtkBoundingBox > & GetRawCuts() const
When using an internally generated kd-tree for ordered compositing, this method provides access to th...
vtkPVRenderView specific subclass of vtkPVDataDeliveryManager.
vtkTimeStamp GetCutsMTime() const
Provides access to the "cuts" built by this class when doing ordered compositing. ...
virtual void MoveData(vtkPVDataRepresentation *repr, bool low_res, int port)=0
This method is called to request that the subclass do appropriate transfer for the indicated represen...
port
static vtkObject * New()
void PrintSelf(ostream &os, vtkIndent indent) override