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

Method BuildDefaultSCurve

Views/Infovis/vtkParallelCoordinatesRepresentation.cxx:1188–1207  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1186
1187//------------------------------------------------------------------------------
1188void vtkParallelCoordinatesRepresentation::BuildDefaultSCurve(
1189 vtkDoubleArray* defArray, int numValues)
1190{
1191 if (!defArray)
1192 return;
1193
1194 // build a default spline, going from (0,0) to (1,1),
1195 vtkSmartPointer<vtkSCurveSpline> defSpline = vtkSmartPointer<vtkSCurveSpline>::New();
1196 defSpline->SetParametricRange(0, 1);
1197 defSpline->AddPoint(0, 0);
1198 defSpline->AddPoint(1, 1);
1199
1200 // fill in an array with the interpolated curve values
1201 defArray->Initialize();
1202 defArray->SetNumberOfValues(numValues);
1203 for (int i = 0; i < numValues; i++)
1204 {
1205 defArray->SetValue(i, defSpline->Evaluate(static_cast<double>(i) / numValues));
1206 }
1207}
1208
1209//------------------------------------------------------------------------------
1210int vtkParallelCoordinatesRepresentation::PlaceSelection(

Callers 2

PlaceCurvesMethod · 0.95

Calls 7

SetParametricRangeMethod · 0.80
NewFunction · 0.50
AddPointMethod · 0.45
InitializeMethod · 0.45
SetNumberOfValuesMethod · 0.45
SetValueMethod · 0.45
EvaluateMethod · 0.45

Tested by

no test coverage detected