------------------------------------------------------------------------------
| 1024 | |
| 1025 | //------------------------------------------------------------------------------ |
| 1026 | void 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 | //------------------------------------------------------------------------------ |
| 1056 | void vtkModifiedBSPTree::PrintSelf(ostream& os, vtkIndent indent) |