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

Method DeepCopy

Common/DataModel/vtkCellGrid.cxx:118–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void vtkCellGrid::DeepCopy(vtkDataObject* baseSrc)
119{
120 auto* src = vtkCellGrid::SafeDownCast(baseSrc);
121 if (!src)
122 {
123 vtkErrorMacro("Cannot shallow-copy a null object or object of a different type.");
124 return;
125 }
126
127 this->Initialize();
128 vtkNew<vtkCellGridCopyQuery> copier;
129 copier->SetSource(src);
130 copier->SetTarget(this);
131 copier->CopyOnlyShapeOff();
132 copier->AddAllSourceCellAttributeIds();
133 copier->CopyCellsOn();
134 copier->CopyArraysOn();
135 copier->CopyArrayValuesOn();
136 copier->DeepCopyArraysOn();
137 if (!src->Query(copier))
138 {
139 vtkErrorMacro("Failed to copy the source " << src);
140 }
141}
142
143bool vtkCellGrid::CopyStructure(vtkCellGrid* other, bool byReference)
144{

Callers

nothing calls this directly

Calls 5

InitializeMethod · 0.95
SetSourceMethod · 0.45
SetTargetMethod · 0.45
QueryMethod · 0.45

Tested by

no test coverage detected