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

Method GetCell

Testing/GenericBridge/vtkBridgeCellIteratorOnCellBoundaries.cxx:88–120  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Cell at current position \pre not_at_end: !IsAtEnd() \pre c_exists: c!=0 THREAD SAFE

Source from the content-addressed store, hash-verified

86// \pre c_exists: c!=0
87// THREAD SAFE
88void vtkBridgeCellIteratorOnCellBoundaries::GetCell(vtkGenericAdaptorCell* c)
89{
90 assert("pre: not_at_end" && !IsAtEnd());
91 assert("pre: c_exists" && c != nullptr);
92
93 vtkBridgeCell* c2 = static_cast<vtkBridgeCell*>(c);
94
95 vtkCell* vc = nullptr;
96
97 switch (this->Dim)
98 {
99 case 2:
100 vc = this->DataSetCell->Cell->GetFace(this->Id);
101 break;
102 case 1:
103 vc = this->DataSetCell->Cell->GetEdge(this->Id);
104 break;
105 case 0:
106 vc = vtkVertex::New();
107 vc->Points->InsertNextPoint(this->DataSetCell->Cell->Points->GetPoint(this->Id));
108 vc->PointIds->InsertNextId(0);
109 break;
110 default:
111 assert("check: impossible case" && 0);
112 break;
113 }
114
115 c2->InitWithCell(vc, this->Id); // this->Id unique?
116 if (this->Dim == 0)
117 {
118 vc->Delete();
119 }
120}
121
122//------------------------------------------------------------------------------
123// Description:

Callers

nothing calls this directly

Calls 10

InsertNextIdMethod · 0.80
DeleteMethod · 0.65
assertFunction · 0.50
IsAtEndFunction · 0.50
NewFunction · 0.50
GetFaceMethod · 0.45
GetEdgeMethod · 0.45
InsertNextPointMethod · 0.45
GetPointMethod · 0.45
InitWithCellMethod · 0.45

Tested by

no test coverage detected