------------------------------------------------------------------------------
| 329 | |
| 330 | //------------------------------------------------------------------------------ |
| 331 | void vtkHyperTreeGrid::CopyEmptyStructure(vtkDataObject* ds) |
| 332 | { |
| 333 | vtkHyperTreeGrid* htg = vtkHyperTreeGrid::SafeDownCast(ds); |
| 334 | if (!htg) |
| 335 | { |
| 336 | vtkErrorMacro("Unable to copy empty structure of a non-HTG or empty data object in an HTG"); |
| 337 | return; |
| 338 | } |
| 339 | |
| 340 | // RectilinearGrid |
| 341 | memcpy(this->Dimensions, htg->GetDimensions(), 3 * sizeof(unsigned int)); |
| 342 | this->SetExtent(htg->GetExtent()); |
| 343 | memcpy(this->CellDims, htg->GetCellDims(), 3 * sizeof(unsigned int)); |
| 344 | this->DataDescription = htg->DataDescription; |
| 345 | |
| 346 | this->WithCoordinates = htg->WithCoordinates; |
| 347 | if (this->WithCoordinates) |
| 348 | { |
| 349 | this->GetXCoordinates()->DeepCopy(htg->XCoordinates); |
| 350 | this->GetYCoordinates()->DeepCopy(htg->YCoordinates); |
| 351 | this->GetZCoordinates()->DeepCopy(htg->ZCoordinates); |
| 352 | } |
| 353 | |
| 354 | // Copy grid parameters |
| 355 | this->BranchFactor = htg->BranchFactor; |
| 356 | this->Dimension = htg->Dimension; |
| 357 | this->Orientation = htg->Orientation; |
| 358 | |
| 359 | memcpy(this->Extent, htg->GetExtent(), 6 * sizeof(int)); |
| 360 | memcpy(this->Axis, htg->GetAxes(), 2 * sizeof(unsigned int)); |
| 361 | this->NumberOfChildren = htg->NumberOfChildren; |
| 362 | this->DepthLimiter = htg->DepthLimiter; |
| 363 | this->TransposedRootIndexing = htg->TransposedRootIndexing; |
| 364 | this->HasInterface = htg->HasInterface; |
| 365 | this->SetInterfaceNormalsName(htg->InterfaceNormalsName); |
| 366 | this->SetInterfaceInterceptsName(htg->InterfaceInterceptsName); |
| 367 | } |
| 368 | |
| 369 | //------------------------------------------------------------------------------ |
| 370 | void vtkHyperTreeGrid::CopyStructure(vtkDataObject* ds) |