------------------------------------------------------------------------------ Description: Cell at current position \pre not_at_end: !IsAtEnd() \pre c_exists: c!=0 THREAD SAFE
| 86 | // \pre c_exists: c!=0 |
| 87 | // THREAD SAFE |
| 88 | void 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: |
nothing calls this directly
no test coverage detected