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

Method DeepCopy

Common/DataModel/vtkPiecewiseFunction.cxx:109–131  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

107
108//------------------------------------------------------------------------------
109void vtkPiecewiseFunction::DeepCopy(vtkDataObject* o)
110{
111 vtkPiecewiseFunction* f = vtkPiecewiseFunction::SafeDownCast(o);
112
113 if (f != nullptr)
114 {
115 this->Clamping = f->Clamping;
116 int i;
117 this->RemoveAllPoints();
118 for (i = 0; i < f->GetSize(); i++)
119 {
120 double val[4];
121 int isInRange = f->GetNodeValue(i, val);
122 assert(isInRange == 1);
123 (void)isInRange;
124 this->AddPoint(val[0], val[1], val[2], val[3]);
125 }
126 this->Modified();
127 }
128
129 // Do the superclass
130 this->Superclass::DeepCopy(o);
131}
132
133//------------------------------------------------------------------------------
134void vtkPiecewiseFunction::ShallowCopy(vtkDataObject* o)

Callers

nothing calls this directly

Calls 6

RemoveAllPointsMethod · 0.95
AddPointMethod · 0.95
assertFunction · 0.50
GetSizeMethod · 0.45
GetNodeValueMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected