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

Method Clear

Rendering/Volume/vtkUnstructuredGridVolumeZSweepMapper.cxx:2078–2101  ·  view source on GitHub ↗

For each vertex, clear the list of faces incident to it. also set number of cells per vertex to 0.

Source from the content-addressed store, hash-verified

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,

Callers 4

RenderMethod · 0.45
CleanMethod · 0.45
AllocateUseSetMethod · 0.45

Calls 5

UnrefMethod · 0.80
pop_frontMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected