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

Method RemoveCellAttribute

Common/DataModel/vtkCellGrid.cxx:497–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495}
496
497bool vtkCellGrid::RemoveCellAttribute(vtkCellAttribute* attribute)
498{
499 if (!attribute)
500 {
501 return false;
502 }
503 // Do not allow the shape attribute to be removed:
504 if (this->ShapeAttribute.GetId() == attribute->GetHash())
505 {
506 return false;
507 }
508 auto it = this->Attributes.find(attribute->GetHash());
509 if (it == this->Attributes.end())
510 {
511 return false;
512 }
513 // Remove any cache for this cell-attribute's ranges.
514 this->RangeCache.erase(attribute);
515 // Now unhook the cell-attribute:
516 this->Attributes.erase(it);
517 return true;
518}
519
520bool vtkCellGrid::GetCellAttributeRange(
521 vtkCellAttribute* attribute, int componentIndex, double range[2], bool finiteRange) const

Callers 2

ReadMeshMethod · 0.80

Calls 5

GetHashMethod · 0.80
GetIdMethod · 0.45
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected