------------------------------------------------------------------------------
| 1186 | |
| 1187 | //------------------------------------------------------------------------------ |
| 1188 | void 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 | //------------------------------------------------------------------------------ |
| 1210 | int vtkParallelCoordinatesRepresentation::PlaceSelection( |
no test coverage detected