vtkCompositeRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkCompositeRepresentation_h
21 #define vtkCompositeRepresentation_h
22 
24 #include "vtkRemotingViewsModule.h" //needed for exports
25 
26 class vtkStringArray;
27 
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36  vtkInformation* outInfo) override;
37 
41  void SetVisibility(bool val) override;
42 
44 
48  virtual void AddRepresentation(const char* key, vtkPVDataRepresentation* repr);
49  virtual void RemoveRepresentation(vtkPVDataRepresentation* repr);
50  virtual void RemoveRepresentation(const char* key);
52 
54 
58  void SetActiveRepresentation(const char* key);
59  const char* GetActiveRepresentationKey();
61 
65  vtkPVDataRepresentation* GetActiveRepresentation();
66 
68 
73  void SetInputConnection(int port, vtkAlgorithmOutput* input) override;
74  void SetInputConnection(vtkAlgorithmOutput* input) override;
75  void AddInputConnection(int port, vtkAlgorithmOutput* input) override;
76  void AddInputConnection(vtkAlgorithmOutput* input) override;
77  void RemoveInputConnection(int port, vtkAlgorithmOutput* input) override;
78  void RemoveInputConnection(int port, int idx) override;
80 
85  void SetSelectionConnection(vtkAlgorithmOutput* input);
86 
90  void MarkModified() override;
91 
95  vtkDataObject* GetRenderedDataObject(int port) override;
96 
100  vtkStringArray* GetRepresentationTypes();
101 
103 
106  void SetUpdateTime(double time) override;
107  void SetForceUseCache(bool val) override;
108  void SetForcedCacheKey(double val) override;
110 
111 protected:
113  ~vtkCompositeRepresentation() override;
114 
115  int FillInputPortInformation(int, vtkInformation* info) override;
116 
122  bool AddToView(vtkView* view) override;
123 
129  bool RemoveFromView(vtkView* view) override;
130 
134  void TriggerUpdateDataEvent();
135 
136 private:
138  void operator=(const vtkCompositeRepresentation&) = delete;
139 
140  class vtkInternals;
141  vtkInternals* Internals;
143 };
144 
145 #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)