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

Method AddUserCurvesPoint

Rendering/Annotation/vtkXYPlotActor.cxx:2867–2884  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2865
2866//------------------------------------------------------------------------------
2867void vtkXYPlotActor::AddUserCurvesPoint(double c_dbl, double x, double y)
2868{
2869 int c = static_cast<int>(c_dbl);
2870 if (this->ActiveCurveIndex != c)
2871 {
2872 vtkPolyData* dataObj = vtkPolyData::New();
2873 dataObj->GetFieldData()->AddArray(this->ActiveCurve);
2874 this->AddDataObjectInput(dataObj);
2875 this->SetDataObjectXComponent(this->ActiveCurveIndex, 0);
2876 this->SetDataObjectYComponent(this->ActiveCurveIndex, 1);
2877 dataObj->Delete();
2878 this->ActiveCurve = vtkSmartPointer<vtkDoubleArray>::New();
2879 this->ActiveCurve->SetNumberOfComponents(2);
2880 this->ActiveCurveIndex = c;
2881 }
2882 this->ActiveCurve->InsertNextTuple2(x, y);
2883 this->Modified();
2884}
2885
2886//------------------------------------------------------------------------------
2887void vtkXYPlotActor::RemoveAllActiveCurves()

Callers

nothing calls this directly

Calls 10

AddDataObjectInputMethod · 0.95
InsertNextTuple2Method · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
AddArrayMethod · 0.45
GetFieldDataMethod · 0.45
SetNumberOfComponentsMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected