------------------------------------------------------------------------------ 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
| 81 | // THE DATASET IS NOT MODIFIED |
| 82 | // \pre types_exist: types!=0 |
| 83 | void vtkGenericDataSet::GetDistinctCellTypes(vtkCellTypes* types) |
| 84 | { |
| 85 | assert("pre: types_exist" && types != nullptr); |
| 86 | |
| 87 | unsigned char type; |
| 88 | vtkGenericCellIterator* it = this->NewCellIterator(-1); |
| 89 | vtkGenericAdaptorCell* c = it->NewCell(); |
| 90 | |
| 91 | types->Reset(); |
| 92 | it->Begin(); |
| 93 | while (!it->IsAtEnd()) |
| 94 | { |
| 95 | it->GetCell(c); |
| 96 | type = c->GetType(); |
| 97 | if (!types->IsType(type)) |
| 98 | { |
| 99 | types->InsertNextType(type); |
| 100 | } |
| 101 | it->Next(); |
| 102 | } |
| 103 | c->Delete(); |
| 104 | it->Delete(); |
| 105 | } |
| 106 | |
| 107 | //------------------------------------------------------------------------------ |
| 108 | // Return a pointer to the geometry bounding box in the form |