------------------------------------------------------------------------------
| 95 | |
| 96 | //------------------------------------------------------------------------------ |
| 97 | vtkTimeSourceExample::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 | //------------------------------------------------------------------------------ |
| 124 | vtkTimeSourceExample::~vtkTimeSourceExample() |
nothing calls this directly
no test coverage detected