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

Method GetAttributeIndex

Common/DataModel/vtkGenericAttributeCollection.cxx:200–206  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Return the index of the first component of attribute `i' in an array of format attrib0comp0 attrib0comp1 ... attrib4comp0 ... \pre valid_i: i>=0 && i GetCentering()==vtkPointCentered

Source from the content-addressed store, hash-verified

198// \pre valid_i: i>=0 && i<GetNumberOfAttributes()
199// \pre is_point_centered: GetAttribute(i)->GetCentering()==vtkPointCentered
200int vtkGenericAttributeCollection::GetAttributeIndex(int i)
201{
202 assert("pre: valid_i" && i >= 0 && i < this->GetNumberOfAttributes());
203 assert("pre: is_point_centered" && this->GetAttribute(i)->GetCentering() == vtkPointCentered);
204 this->ComputeNumbers();
205 return this->AttributeIndices->Vector[i];
206}
207
208//------------------------------------------------------------------------------
209// Description:

Callers 2

GetErrorMethod · 0.80

Calls 5

GetNumberOfAttributesMethod · 0.95
GetAttributeMethod · 0.95
ComputeNumbersMethod · 0.95
GetCenteringMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected