vtkPVComparativeAnimationCue.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkPVComparativeAnimationCue_h
15 #define vtkPVComparativeAnimationCue_h
16 
17 #include "vtkObject.h"
18 #include "vtkRemotingViewsModule.h" //needed for exports
19 
20 class vtkSMDomain;
21 class vtkSMProperty;
22 class vtkSMProxy;
23 class vtkPVXMLElement;
24 
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
36  void SetAnimatedProxy(vtkSMProxy*);
37  vtkGetObjectMacro(AnimatedProxy, vtkSMProxy);
38  void RemoveAnimatedProxy();
40 
42 
45  vtkSetStringMacro(AnimatedPropertyName);
46  vtkGetStringMacro(AnimatedPropertyName);
48 
50 
53  vtkSetStringMacro(AnimatedDomainName);
54  vtkGetStringMacro(AnimatedDomainName);
56 
58 
63  vtkSetMacro(AnimatedElement, int);
64  vtkGetMacro(AnimatedElement, int);
66 
68 
71  vtkSetMacro(Enabled, bool);
72  vtkGetMacro(Enabled, bool);
73  vtkBooleanMacro(Enabled, bool);
75 
84  void UpdateXRange(int y, double minx, double maxx) { this->UpdateXRange(y, &minx, &maxx, 1); }
85  void UpdateYRange(int x, double miny, double maxy) { this->UpdateYRange(x, &miny, &maxy, 1); }
86  void UpdateWholeRange(double mint, double maxt) { this->UpdateWholeRange(&mint, &maxt, 1); }
87  void UpdateValue(int x, int y, double value) { this->UpdateValue(x, y, &value, 1); }
88 
90 
95  void UpdateXRange(int y, double* minx, double* maxx, unsigned int numvalues);
96  void UpdateYRange(int x, double* minx, double* maxx, unsigned int numvalues);
97  void UpdateWholeRange(double* mint, double* maxt, unsigned int numValues)
98  {
99  this->UpdateWholeRange(mint, maxt, numValues, false);
100  }
101  void UpdateWholeRange(double* mint, double* maxt, unsigned int numValues, bool vertical_first);
102  void UpdateValue(int x, int y, double* value, unsigned int numValues);
104 
110  void UpdateAnimatedValue(int x, int y, int dx, int dy);
111 
113 
118  double GetValue(int x, int y, int dx, int dy)
119  {
120  unsigned int numValues = 0;
121  double* vals = this->GetValues(x, y, dx, dy, numValues);
122  if (numValues > 0)
123  {
124  return vals[0];
125  }
126  return -1.0;
127  }
129 
134  double* GetValues(int x, int y, int dx, int dy, unsigned int& numValues);
135 
136  vtkPVXMLElement* AppendCommandInfo(vtkPVXMLElement* proxyElem);
137  int LoadCommandInfo(vtkPVXMLElement* proxyElement);
138 
139 protected:
141  ~vtkPVComparativeAnimationCue() override;
142 
146  vtkSMProperty* GetAnimatedProperty();
147 
151  vtkSMDomain* GetAnimatedDomain();
152 
157  double* Values;
158  bool Enabled;
159 
160 private:
162  void operator=(const vtkPVComparativeAnimationCue&) = delete;
163 
164  class vtkInternals;
165  vtkInternals* Internals;
166 };
167 
168 #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:37
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:140
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 &)