vtkPVRenderViewDataDeliveryManager.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkPVRenderViewDataDeliveryManager_h
12 #define vtkPVRenderViewDataDeliveryManager_h
13 
14 #include "vtkBoundingBox.h" // needed for iVar.
16 #include "vtkRemotingViewsModule.h" //needed for exports
17 #include "vtkSmartPointer.h" // needed for iVar.
18 #include "vtkTuple.h" // needed for vtkTuple.
19 #include "vtkWeakPointer.h" // needed for iVar.
20 
21 class vtkAlgorithmOutput;
22 class vtkDataObject;
24 class vtkInformation;
25 class vtkMatrix4x4;
27 class vtkPVView;
28 
29 #include <vector> // for std::vector
30 
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
45  void SetDeliverToAllProcesses(vtkPVDataRepresentation*, bool flag, bool low_res, int port = 0);
46 
57  void SetDeliverToClientAndRenderingProcesses(vtkPVDataRepresentation*, bool deliver_to_client,
58  bool gather_before_delivery, bool low_res, int port = 0);
59 
61 
69  void SetRedistributionMode(vtkPVDataRepresentation*, int mode, int port = 0);
70  void SetRedistributionModeToSplitBoundaryCells(vtkPVDataRepresentation* repr, int port = 0);
71  void SetRedistributionModeToDuplicateBoundaryCells(vtkPVDataRepresentation* repr, int port = 0);
72  void SetRedistributionModeToUniquelyAssignBoundaryCells(
73  vtkPVDataRepresentation* repr, int port = 0);
75 
80  void RedistributeDataForOrderedCompositing(bool use_lod);
81 
88  void ClearRedistributedData(bool use_load);
89 
94  void SetOrderedCompositingConfiguration(
95  vtkPVDataRepresentation* repr, int config, const double* bds, int port = 0);
96 
98 
101  void SetGeometryBounds(vtkPVDataRepresentation* repr, const double bds[6],
102  vtkMatrix4x4* matrix = nullptr, int port = 0);
103  vtkBoundingBox GetGeometryBounds(vtkPVDataRepresentation* repr, int port = 0);
104  vtkBoundingBox GetTransformedGeometryBounds(vtkPVDataRepresentation* repr, int port = 0);
106 
107  // *******************************************************************
108  // UNDER CONSTRUCTION STREAMING API
109  // *******************************************************************
110 
116  void SetStreamable(vtkPVDataRepresentation*, bool, int port = 0);
117 
119 
123  void SetNextStreamedPiece(vtkPVDataRepresentation* repr, vtkDataObject* piece, int port = 0);
124  vtkDataObject* GetCurrentStreamedPiece(vtkPVDataRepresentation* repr, int port = 0);
125  void ClearStreamedPieces();
127 
133  void DeliverStreamedPieces(unsigned int size, unsigned int* keys);
134 
139  bool GetRepresentationsReadyToStreamPieces(std::vector<unsigned int>& keys);
140 
142 
146  vtkGetMacro(UseRedistributedDataAsDeliveredData, bool);
147  vtkSetMacro(UseRedistributedDataAsDeliveredData, bool);
149 
150  int GetDeliveredDataKey(bool low_res) const override;
151 
153 
159  const std::vector<vtkBoundingBox>& GetCuts() const { return this->Cuts; }
160  vtkTimeStamp GetCutsMTime() const { return this->CutsMTime; }
162 
164 
174  const std::vector<vtkBoundingBox>& GetRawCuts() const { return this->RawCuts; }
175  const std::vector<int>& GetRawCutsRankAssignments() const { return this->RawCutsRankAssignments; }
177 
178 protected:
181 
182  void MoveData(vtkPVDataRepresentation* repr, bool low_res, int port) override;
183 
184  int GetViewDataDistributionMode(bool low_res) const;
185  int GetMoveMode(vtkInformation* info, int viewMode) const;
186 
187  std::vector<vtkBoundingBox> Cuts;
188  std::vector<vtkBoundingBox> RawCuts;
189  std::vector<int> RawCutsRankAssignments;
191 
194  bool UseRedistributedDataAsDeliveredData = false;
195 
196 private:
198  void operator=(const vtkPVRenderViewDataDeliveryManager&) = delete;
199 };
200 
201 #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:32
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