For each vertex, clear the list of faces incident to it. also set number of cells per vertex to 0.
| 2076 | // For each vertex, clear the list of faces incident to it. |
| 2077 | // also set number of cells per vertex to 0. |
| 2078 | void Clear() |
| 2079 | { |
| 2080 | vtkIdType i = 0; |
| 2081 | vtkIdType c = static_cast<vtkIdType>(this->Vector.size()); |
| 2082 | while (i < c) |
| 2083 | { |
| 2084 | if (this->Vector[i] != nullptr) |
| 2085 | { |
| 2086 | while (!this->Vector[i]->empty()) |
| 2087 | { |
| 2088 | (*this->Vector[i]->begin())->Unref(); |
| 2089 | this->Vector[i]->pop_front(); |
| 2090 | } |
| 2091 | delete this->Vector[i]; |
| 2092 | this->Vector[i] = nullptr; |
| 2093 | } |
| 2094 | ++i; |
| 2095 | } |
| 2096 | while (!this->AllFaces.empty()) |
| 2097 | { |
| 2098 | (*this->AllFaces.begin())->Unref(); |
| 2099 | this->AllFaces.pop_front(); |
| 2100 | } |
| 2101 | } |
| 2102 | |
| 2103 | // Add face to each vertex only if the useset does not have the face yet. |
| 2104 | void AddFace(vtkIdType faceIds[3], vtkDataArray* scalars, vtkIdType cellIdx, |
no test coverage detected