vtkCompositeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkCompositeRepresentation.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 =========================================================================*/
32 #ifndef vtkCompositeRepresentation_h
33 #define vtkCompositeRepresentation_h
34 
36 #include "vtkRemotingViewsModule.h" //needed for exports
37 
38 class vtkStringArray;
39 
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48  vtkInformation* outInfo) override;
49 
53  void SetVisibility(bool val) override;
54 
56 
60  virtual void AddRepresentation(const char* key, vtkPVDataRepresentation* repr);
61  virtual void RemoveRepresentation(vtkPVDataRepresentation* repr);
62  virtual void RemoveRepresentation(const char* key);
64 
66 
70  void SetActiveRepresentation(const char* key);
71  const char* GetActiveRepresentationKey();
73 
77  vtkPVDataRepresentation* GetActiveRepresentation();
78 
80 
85  void SetInputConnection(int port, vtkAlgorithmOutput* input) override;
86  void SetInputConnection(vtkAlgorithmOutput* input) override;
87  void AddInputConnection(int port, vtkAlgorithmOutput* input) override;
88  void AddInputConnection(vtkAlgorithmOutput* input) override;
89  void RemoveInputConnection(int port, vtkAlgorithmOutput* input) override;
90  void RemoveInputConnection(int port, int idx) override;
92 
97  void SetSelectionConnection(vtkAlgorithmOutput* input);
98 
102  void MarkModified() override;
103 
107  vtkDataObject* GetRenderedDataObject(int port) override;
108 
112  vtkStringArray* GetRepresentationTypes();
113 
115 
118  void SetUpdateTime(double time) override;
119  void SetForceUseCache(bool val) override;
120  void SetForcedCacheKey(double val) override;
122 
123 protected:
125  ~vtkCompositeRepresentation() override;
126 
127  int FillInputPortInformation(int, vtkInformation* info) override;
128 
134  bool AddToView(vtkView* view) override;
135 
141  bool RemoveFromView(vtkView* view) override;
142 
146  void TriggerUpdateDataEvent();
147 
148 private:
150  void operator=(const vtkCompositeRepresentation&) = delete;
151 
152  class vtkInternals;
153  vtkInternals* Internals;
155 };
156 
157 #endif
combine multiple representations into one with only 1 representation active at a time.
virtual vtkDataObject * GetRenderedDataObject(int vtkNotUsed(port))
Returns the data object that is rendered from the given input port.
#define VTKREMOTINGVIEWS_EXPORT
void AddInputConnection(int port, vtkAlgorithmOutput *input) override
Overridden to ensure that MarkModified is called.
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual void SetUpdateTime(double time)
Set the update time.
bool AddToView(vtkView *view) override
Making these methods public.
virtual void SetForceUseCache(bool val)
Generally, caching is within the purview of the vtkPVView (and subclasses).
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual int FillInputPortInformation(int port, vtkInformation *info)
void SetInputConnection(int port, vtkAlgorithmOutput *input) override
Overridden to ensure that MarkModified is called.
bool RemoveFromView(vtkView *view) override
Making these methods public.
virtual void MarkModified()
This is one of the most important functions.
virtual void SetForcedCacheKey(double val)
Generally, caching is within the purview of the vtkPVView (and subclasses).
static vtkDataRepresentation * New()
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput *input)