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

Method NumCellsFunction

Filters/General/vtkTimeSourceExample.cxx:83–94  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

81
82//------------------------------------------------------------------------------
83int vtkTimeSourceExample::NumCellsFunction(double t)
84{
85 int numCells = 1;
86 if (this->Growing)
87 {
88 // goes from 1 to NumSteps/2+1, adding one cell each step, and returns
89 double halfSteps = this->NumSteps / 2.0;
90 numCells = (int)(halfSteps - (fabs(2.0 * (t - 0.5) * halfSteps)));
91 numCells += 1;
92 }
93 return numCells;
94}
95
96//------------------------------------------------------------------------------
97vtkTimeSourceExample::vtkTimeSourceExample()

Callers 1

RequestDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected