ParaView
vtkPVDataRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVDataRepresentation.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 =========================================================================*/
24 #ifndef vtkPVDataRepresentation_h
25 #define vtkPVDataRepresentation_h
26 
27 #include "vtkDataRepresentation.h"
28 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
29 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
30 class vtkInformationRequestKey;
31 
32 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVDataRepresentation : public vtkDataRepresentation
33 {
34 public:
35  vtkTypeMacro(vtkPVDataRepresentation, vtkDataRepresentation);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
45  virtual int ProcessViewRequest(
46  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
47 
68  virtual void MarkModified();
69 
83  virtual unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable);
84 
89  unsigned int GetUniqueIdentifier() { return this->UniqueIdentifier; }
90 
95  virtual void SetVisibility(bool val) { this->Visibility = val; }
96  vtkGetMacro(Visibility, bool);
97 
101  virtual vtkDataObject* GetRenderedDataObject(int vtkNotUsed(port))
102  {
103  return this->GetInputDataObject(0, 0);
104  }
105 
107 
110  virtual void SetUpdateTime(double time);
111  vtkGetMacro(UpdateTime, double);
113 
115 
118  vtkGetMacro(UpdateTimeValid, bool);
120 
122 
126  VTK_LEGACY(virtual void SetUseCache(bool));
127  VTK_LEGACY(virtual void SetCacheKey(double val));
129 
138  virtual void SetForcedCacheKey(double val) { this->ForcedCacheKey = val; }
139  virtual void SetForceUseCache(bool val) { this->ForceUseCache = val; }
140 
142 
146  virtual double GetCacheKey();
147  virtual bool GetUseCache();
149 
156  bool GetUsingCacheForUpdate();
157 
158  vtkGetMacro(NeedUpdate, bool);
159 
161 
165  virtual bool AddToView(vtkView* view);
166  virtual bool RemoveFromView(vtkView* view);
168 
175  virtual vtkAlgorithmOutput* GetInternalOutputPort() { return this->GetInternalOutputPort(0); }
176  virtual vtkAlgorithmOutput* GetInternalOutputPort(int port)
177  {
178  return this->GetInternalOutputPort(port, 0);
179  }
180  virtual vtkAlgorithmOutput* GetInternalOutputPort(int port, int conn);
181 
185  vtkView* GetView() const;
186 
187 protected:
190 
195  virtual bool IsCached(double cache_key)
196  {
197  (void)cache_key;
198  return false;
199  }
200 
204  virtual vtkExecutive* CreateDefaultExecutive();
205 
209  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
210 
211  virtual int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
212  vtkInformationVector* outputVector);
213 
214  virtual int RequestUpdateTime(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
215 
216  double UpdateTime;
218  unsigned int UniqueIdentifier;
219 
220 private:
221  vtkPVDataRepresentation(const vtkPVDataRepresentation&) VTK_DELETE_FUNCTION;
222  void operator=(const vtkPVDataRepresentation&) VTK_DELETE_FUNCTION;
223 
224  bool Visibility;
225  bool ForceUseCache;
226  double ForcedCacheKey;
227  bool NeedUpdate;
228 
229  class Internals;
230  Internals* Implementation;
231  vtkWeakPointer<vtkView> View;
232 };
233 
234 #endif
virtual vtkDataObject * GetRenderedDataObject(int vtkNotUsed(port))
Returns the data object that is rendered from the given input port.
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual bool IsCached(double cache_key)
Subclasses should override this method when they support caching to indicate if the particular key is...
virtual void SetForceUseCache(bool val)
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual vtkAlgorithmOutput * GetInternalOutputPort(int port)
unsigned int GetUniqueIdentifier()
Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across t...
virtual vtkAlgorithmOutput * GetInternalOutputPort()
Retrieves an output port for the input data object at the specified port and connection index...
virtual void SetForcedCacheKey(double val)
Typically a representation decides whether to use cache based on the view&#39;s values for UseCache and C...