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

Method ShallowCopy

Rendering/Core/vtkMapper.cxx:313–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313void vtkMapper::ShallowCopy(vtkAbstractMapper* mapper)
314{
315 vtkMapper* m = vtkMapper::SafeDownCast(mapper);
316 if (m != nullptr)
317 {
318 this->SetLookupTable(m->GetLookupTable());
319 this->SetScalarVisibility(m->GetScalarVisibility());
320 this->SetScalarRange(m->GetScalarRange());
321 this->SetColorMode(m->GetColorMode());
322 this->SetScalarMode(m->GetScalarMode());
323 this->SetUseLookupTableScalarRange(m->GetUseLookupTableScalarRange());
324 this->SetInterpolateScalarsBeforeMapping(m->GetInterpolateScalarsBeforeMapping());
325 this->SetFieldDataTupleId(m->GetFieldDataTupleId());
326
327 if (m->GetArrayAccessMode() == VTK_GET_ARRAY_BY_ID)
328 {
329 this->ColorByArrayComponent(m->GetArrayId(), m->GetArrayComponent());
330 }
331 else
332 {
333 this->ColorByArrayComponent(m->GetArrayName(), m->GetArrayComponent());
334 }
335
336 double f, u;
337 m->GetRelativeCoincidentTopologyPolygonOffsetParameters(f, u);
338 this->SetRelativeCoincidentTopologyPolygonOffsetParameters(f, u);
339
340 m->GetRelativeCoincidentTopologyLineOffsetParameters(f, u);
341 this->SetRelativeCoincidentTopologyLineOffsetParameters(f, u);
342
343 m->GetRelativeCoincidentTopologyPointOffsetParameter(u);
344 this->SetRelativeCoincidentTopologyPointOffsetParameter(u);
345 }
346
347 // Now do superclass
348 this->vtkAbstractMapper3D::ShallowCopy(mapper);
349}
350
351// a side effect of this is that this->Colors is also set
352// to the return value

Callers

nothing calls this directly

Tested by

no test coverage detected