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

Method InitializeFacesRepresentation

Common/DataModel/vtkUnstructuredGrid.cxx:643–664  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

641
642//------------------------------------------------------------------------------
643int vtkUnstructuredGrid::InitializeFacesRepresentation(vtkIdType numPrevCells)
644{
645 if (this->Faces || this->FaceLocations)
646 {
647 vtkErrorMacro("Face information already exist for this unstructured grid. "
648 "InitializeFacesRepresentation returned without execution.");
649 return 0;
650 }
651
652 this->Faces = vtkSmartPointer<vtkCellArray>::New();
653 this->Faces->AllocateEstimate(this->Types->GetSize() * 6, 4); // assume 4 pts/face
654 this->FaceLocations = vtkSmartPointer<vtkCellArray>::New();
655 this->FaceLocations->AllocateEstimate(this->Types->GetSize(), 6); // assume 6 faces/cell
656
657 // FaceLocations must be padded until the current position
658 for (vtkIdType i = 0; i < numPrevCells; i++)
659 {
660 this->FaceLocations->InsertNextCell(0);
661 }
662
663 return 1;
664}
665
666//------------------------------------------------------------------------------
667vtkMTimeType vtkUnstructuredGrid::GetMeshMTime()

Callers 2

ReadPieceDataMethod · 0.80
ReadPieceDataMethod · 0.80

Calls 4

AllocateEstimateMethod · 0.80
NewFunction · 0.50
GetSizeMethod · 0.45
InsertNextCellMethod · 0.45

Tested by

no test coverage detected