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

Method GetDistinctCellTypes

Testing/GenericBridge/vtkBridgeDataSet.cxx:296–313  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Get a list of types of cells in a dataset. The list consists of an array of types (not necessarily in any order), with a single entry per type. For example a dataset 5 triangles, 3 lines, and 100 hexahedra would result a list of three entries, corresponding to the types VTK_TRIANGLE, VTK_LINE, and VTK_HEXAH

Source from the content-addressed store, hash-verified

294// THE DATASET IS NOT MODIFIED
295// \pre types_exist: types!=0
296void vtkBridgeDataSet::GetDistinctCellTypes(vtkCellTypes* types)
297{
298 assert("pre: types_exist" && types != nullptr);
299
300 int i;
301 int c;
302 this->ComputeNumberOfCellsAndTypes();
303
304 // copy from `this->Types' to `types'.
305 types->Reset();
306 c = this->Types->GetNumberOfTypes();
307 i = 0;
308 while (i < c)
309 {
310 types->InsertNextType(this->Types->GetCellType(i));
311 ++i;
312 }
313}
314
315//------------------------------------------------------------------------------
316// Description:

Callers 1

GetCellTypesFunction · 0.45

Calls 4

assertFunction · 0.50
ResetMethod · 0.45
GetCellTypeMethod · 0.45

Tested by

no test coverage detected