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

Method GetType

Testing/GenericBridge/vtkBridgeAttribute.cxx:83–105  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Type of the attribute: scalar, vector, normal, texture coordinate, tensor \post valid_result: (result==vtkDataSetAttributes::SCALARS) ||(result==vtkDataSetAttributes::VECTORS) ||(result==vtkDataSetAttributes::NORMALS) ||(result==vtkDataSetAttributes::TCOORDS) ||(result==vtkDataSetAttributes::TENSORS)

Source from the content-addressed store, hash-verified

81// ||(result==vtkDataSetAttributes::TCOORDS)
82// ||(result==vtkDataSetAttributes::TENSORS)
83int vtkBridgeAttribute::GetType()
84{
85 int result = this->Data->IsArrayAnAttribute(this->AttributeNumber);
86 if (result == -1)
87 {
88 switch (this->GetNumberOfComponents())
89 {
90 case 1:
91 result = vtkDataSetAttributes::SCALARS;
92 break;
93 case 3:
94 result = vtkDataSetAttributes::VECTORS;
95 break;
96 case 9:
97 result = vtkDataSetAttributes::TENSORS;
98 break;
99 default:
100 assert("check: unknown attribute type" && 0);
101 break;
102 }
103 }
104 return result;
105}
106
107//------------------------------------------------------------------------------
108// Description:

Callers

nothing calls this directly

Calls 3

GetNumberOfComponentsMethod · 0.95
IsArrayAnAttributeMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected