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

Method CopyEmptyStructure

Common/DataModel/vtkHyperTreeGrid.cxx:331–367  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

329
330//------------------------------------------------------------------------------
331void 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//------------------------------------------------------------------------------
370void vtkHyperTreeGrid::CopyStructure(vtkDataObject* ds)

Callers 3

ProcessTreesMethod · 0.80
ProcessTreesMethod · 0.80

Calls 8

SetExtentMethod · 0.95
GetXCoordinatesMethod · 0.95
GetYCoordinatesMethod · 0.95
GetZCoordinatesMethod · 0.95
GetDimensionsMethod · 0.45
GetExtentMethod · 0.45
GetCellDimsMethod · 0.45
DeepCopyMethod · 0.45

Tested by 1