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

Method ShallowCopy

Filters/FlowPaths/vtkModifiedBSPTree.cxx:1026–1053  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1024
1025//------------------------------------------------------------------------------
1026void vtkModifiedBSPTree::ShallowCopy(vtkAbstractCellLocator* locator)
1027{
1028 vtkModifiedBSPTree* cellLocator = vtkModifiedBSPTree::SafeDownCast(locator);
1029 if (!cellLocator)
1030 {
1031 vtkErrorMacro("Cannot cast " << locator->GetClassName() << " to vtkModifiedBSPTree.");
1032 return;
1033 }
1034 // we only copy what's actually used by vtkModifiedBSPTree
1035
1036 // vtkLocator parameters
1037 this->SetUseExistingSearchStructure(cellLocator->GetUseExistingSearchStructure());
1038 this->SetMaxLevel(cellLocator->GetMaxLevel());
1039 this->Level = cellLocator->Level;
1040
1041 // vtkAbstractCellLocator parameters
1042 this->SetNumberOfCellsPerNode(cellLocator->GetNumberOfCellsPerNode());
1043 this->CacheCellBounds = cellLocator->CacheCellBounds;
1044 this->CellBoundsSharedPtr = cellLocator->CellBoundsSharedPtr; // This is important
1045 this->CellBounds = this->CellBoundsSharedPtr.get() ? this->CellBoundsSharedPtr->data() : nullptr;
1046
1047 // vtkCellTreeLocator parameters
1048 this->mRoot = cellLocator->mRoot; // This is important
1049 this->npn = cellLocator->npn;
1050 this->nln = cellLocator->nln;
1051 this->tot_depth = cellLocator->tot_depth;
1052 this->BuildTime.Modified();
1053}
1054
1055//------------------------------------------------------------------------------
1056void vtkModifiedBSPTree::PrintSelf(ostream& os, vtkIndent indent)

Callers 10

AddDataSetMethod · 0.45
RequestDataMethod · 0.45
FinalizeMethod · 0.45
RequestDataMethod · 0.45
ReduceMethod · 0.45
AdvectIterativeMethod · 0.45
AdvectSimpleMethod · 0.45
InitializeMethod · 0.45
TestCellLocatorsFunction · 0.45

Calls 4

GetClassNameMethod · 0.45
getMethod · 0.45
dataMethod · 0.45
ModifiedMethod · 0.45

Tested by 2

TestCellLocatorsFunction · 0.36