vtkPVComparativeAnimationCue.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
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 =========================================================================*/
26 #ifndef vtkPVComparativeAnimationCue_h
27 #define vtkPVComparativeAnimationCue_h
28 
29 #include "vtkObject.h"
30 #include "vtkRemotingViewsModule.h" //needed for exports
31 
32 class vtkSMDomain;
33 class vtkSMProperty;
34 class vtkSMProxy;
35 class vtkPVXMLElement;
36 
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  void SetAnimatedProxy(vtkSMProxy*);
49  vtkGetObjectMacro(AnimatedProxy, vtkSMProxy);
50  void RemoveAnimatedProxy();
52 
54 
57  vtkSetStringMacro(AnimatedPropertyName);
58  vtkGetStringMacro(AnimatedPropertyName);
60 
62 
65  vtkSetStringMacro(AnimatedDomainName);
66  vtkGetStringMacro(AnimatedDomainName);
68 
70 
75  vtkSetMacro(AnimatedElement, int);
76  vtkGetMacro(AnimatedElement, int);
78 
80 
83  vtkSetMacro(Enabled, bool);
84  vtkGetMacro(Enabled, bool);
85  vtkBooleanMacro(Enabled, bool);
87 
96  void UpdateXRange(int y, double minx, double maxx) { this->UpdateXRange(y, &minx, &maxx, 1); }
97  void UpdateYRange(int x, double miny, double maxy) { this->UpdateYRange(x, &miny, &maxy, 1); }
98  void UpdateWholeRange(double mint, double maxt) { this->UpdateWholeRange(&mint, &maxt, 1); }
99  void UpdateValue(int x, int y, double value) { this->UpdateValue(x, y, &value, 1); }
100 
102 
107  void UpdateXRange(int y, double* minx, double* maxx, unsigned int numvalues);
108  void UpdateYRange(int x, double* minx, double* maxx, unsigned int numvalues);
109  void UpdateWholeRange(double* mint, double* maxt, unsigned int numValues)
110  {
111  this->UpdateWholeRange(mint, maxt, numValues, false);
112  }
113  void UpdateWholeRange(double* mint, double* maxt, unsigned int numValues, bool vertical_first);
114  void UpdateValue(int x, int y, double* value, unsigned int numValues);
116 
122  void UpdateAnimatedValue(int x, int y, int dx, int dy);
123 
125 
130  double GetValue(int x, int y, int dx, int dy)
131  {
132  unsigned int numValues = 0;
133  double* vals = this->GetValues(x, y, dx, dy, numValues);
134  if (numValues > 0)
135  {
136  return vals[0];
137  }
138  return -1.0;
139  }
141 
146  double* GetValues(int x, int y, int dx, int dy, unsigned int& numValues);
147 
148  vtkPVXMLElement* AppendCommandInfo(vtkPVXMLElement* proxyElem);
149  int LoadCommandInfo(vtkPVXMLElement* proxyElement);
150 
151 protected:
153  ~vtkPVComparativeAnimationCue() override;
154 
158  vtkSMProperty* GetAnimatedProperty();
159 
163  vtkSMDomain* GetAnimatedDomain();
164 
169  double* Values;
170  bool Enabled;
171 
172 private:
174  void operator=(const vtkPVComparativeAnimationCue&) = delete;
175 
176  class vtkInternals;
177  vtkInternals* Internals;
178 };
179 
180 #endif
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void UpdateWholeRange(double *mint, double *maxt, unsigned int numValues)
Use these methods when the parameter can have multiple values eg.
superclass for all SM properties
represents the possible values a property can have
Definition: vtkSMDomain.h:49
void UpdateYRange(int x, double miny, double maxy)
void UpdateXRange(int y, double minx, double maxx)
Methods use to fill up the values for the parameter over the comparative grid.
cue used for parameter animation by the comparative view.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
value
double GetValue(int x, int y, int dx, int dy)
Computes the value for a particular location in the comparative grid.
void UpdateWholeRange(double mint, double maxt)
void UpdateValue(int x, int y, double value)
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkObject * New()
void operator=(const vtkObjectBase &)