MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkTimeSourceExample

Method vtkTimeSourceExample

Filters/General/vtkTimeSourceExample.cxx:97–121  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

95
96//------------------------------------------------------------------------------
97vtkTimeSourceExample::vtkTimeSourceExample()
98{
99 this->SetNumberOfInputPorts(0);
100
101 this->Analytic = 0;
102 this->XAmplitude = 0.0;
103 this->YAmplitude = 0.0;
104 this->Growing = 0;
105
106 this->NumSteps = 10;
107
108 // times are regularly sampled from 0.0 to 1.0
109 this->Steps = new double[this->NumSteps];
110 for (int i = 0; i < this->NumSteps; i++)
111 {
112 this->Steps[i] = (double)i / (double)(this->NumSteps - 1);
113 }
114
115 // create the table of values at those times for usee when acting as discrete
116 this->Values = new double[this->NumSteps];
117 for (int i = 0; i < this->NumSteps; i++)
118 {
119 this->Values[i] = this->ValueFunction((double)i / (double)(this->NumSteps - 1));
120 }
121}
122
123//------------------------------------------------------------------------------
124vtkTimeSourceExample::~vtkTimeSourceExample()

Callers

nothing calls this directly

Calls 2

ValueFunctionMethod · 0.95
SetNumberOfInputPortsMethod · 0.45

Tested by

no test coverage detected