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

Method CopyParameters

Filters/FlowPaths/vtkAbstractInterpolatedVelocityField.cxx:516–543  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

514
515//------------------------------------------------------------------------------
516void vtkAbstractInterpolatedVelocityField::CopyParameters(
517 vtkAbstractInterpolatedVelocityField* from)
518{
519 this->Caching = from->Caching;
520 this->SetFindCellStrategy(from->GetFindCellStrategy());
521 this->NormalizeVector = from->NormalizeVector;
522 this->ForceSurfaceTangentVector = from->ForceSurfaceTangentVector;
523 this->SurfaceDataset = from->SurfaceDataset;
524 this->VectorsType = from->VectorsType;
525 this->SetVectorsSelection(from->VectorsSelection);
526
527 // Copy the datasets' info, including possibly strategies, from the
528 // prototype. In a threaded situation, there must be separate strategies
529 // for each interpolated velocity field.
530 this->InitializationState = from->InitializationState;
531 this->DataSetsInfo.clear();
532 for (const auto& datasetInfo : from->DataSetsInfo)
533 {
534 vtkFindCellStrategy* strategy = nullptr;
535 if (datasetInfo.Strategy != nullptr)
536 {
537 strategy = datasetInfo.Strategy->NewInstance();
538 strategy->CopyParameters(datasetInfo.Strategy);
539 strategy->Initialize(vtkPointSet::SafeDownCast(datasetInfo.DataSet));
540 }
541 this->AddToDataSetsInfo(datasetInfo.DataSet, strategy, datasetInfo.Vectors);
542 }
543}
544
545//------------------------------------------------------------------------------
546void vtkAbstractInterpolatedVelocityField::AddToDataSetsInfo(

Callers

nothing calls this directly

Calls 5

AddToDataSetsInfoMethod · 0.95
SetVectorsSelectionMethod · 0.80
clearMethod · 0.45
NewInstanceMethod · 0.45
InitializeMethod · 0.45

Tested by

no test coverage detected