ParaView
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 
35 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
37 
38 class vtkStringArray;
39 
40 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkCompositeRepresentation
42 {
43 public:
44  static vtkCompositeRepresentation* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
51  virtual void SetVisibility(bool val);
52 
54 
58  virtual void AddRepresentation(const char* key, vtkPVDataRepresentation* repr);
59  virtual void RemoveRepresentation(vtkPVDataRepresentation* repr);
60  virtual void RemoveRepresentation(const char* key);
62 
64 
68  void SetActiveRepresentation(const char* key);
69  const char* GetActiveRepresentationKey();
71 
75  vtkPVDataRepresentation* GetActiveRepresentation();
76 
78 
83  virtual void SetInputConnection(int port, vtkAlgorithmOutput* input);
84  virtual void SetInputConnection(vtkAlgorithmOutput* input);
85  virtual void AddInputConnection(int port, vtkAlgorithmOutput* input);
86  virtual void AddInputConnection(vtkAlgorithmOutput* input);
87  virtual void RemoveInputConnection(int port, vtkAlgorithmOutput* input);
88  virtual void RemoveInputConnection(int port, int idx);
90 
94  virtual void MarkModified();
95 
99  virtual vtkDataObject* GetRenderedDataObject(int port);
100 
104  vtkStringArray* GetRepresentationTypes();
105 
107 
110  virtual void SetUpdateTime(double time);
111  virtual void SetForceUseCache(bool val);
112  virtual void SetForcedCacheKey(double val);
114 
115 protected:
118 
119  virtual int FillInputPortInformation(int, vtkInformation* info);
120 
126  virtual bool AddToView(vtkView* view);
127 
133  virtual bool RemoveFromView(vtkView* view);
134 
138  void TriggerUpdateDataEvent();
139 
140 private:
141  vtkCompositeRepresentation(const vtkCompositeRepresentation&) VTK_DELETE_FUNCTION;
142  void operator=(const vtkCompositeRepresentation&) VTK_DELETE_FUNCTION;
143 
144  class vtkInternals;
145  vtkInternals* Internals;
146  vtkCommand* Observer;
147 };
148 
149 #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.
void PrintSelf(ostream &os, vtkIndent indent)
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual void SetUpdateTime(double time)
Set the update time.
virtual void SetForceUseCache(bool val)
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual bool AddToView(vtkView *view)
Making these methods public.
virtual void MarkModified()
This is one of the most important functions.
virtual void SetForcedCacheKey(double val)
Typically a representation decides whether to use cache based on the view's values for UseCache and C...
virtual bool RemoveFromView(vtkView *view)
Making these methods public.