[vtkusers] How to use unsigned char to represent cell types?

landings landinghere at 163.com
Wed Nov 15 08:49:42 EST 2017


I am using vtkUnstructuredGrid::SetCells() and I don't know what to fill into
the cellTypes array.

By the way, do parameters *types and *cellTypes contain similar values?

-------------------------------------
void vtkUnstructuredGrid::SetCells ( int type, vtkCellArray * cells ) 
void vtkUnstructuredGrid::SetCells ( int * types, vtkCellArray * cells ) 
void vtkUnstructuredGrid::SetCells ( vtkUnsignedCharArray * cellTypes,
vtkIdTypeArray * cellLocations, vtkCellArray * cells ) 
void vtkUnstructuredGrid::SetCells ( vtkUnsignedCharArray * cellTypes,
vtkIdTypeArray * cellLocations, vtkCellArray * cells, vtkIdTypeArray *
faceLocations, vtkIdTypeArray * faces ) 

Description:
-------------------------------------
Most cells require just arrays of cellTypes, cellLocations and
cellConnectivities which implicitly define the set of points in each cell
and their ordering. In those cases the cellConnectivities are of the format
(numFace0Pts, id1, id2, id3, numFace1Pts, id1, id2, id3...). However, some
cells like vtkPolyhedron require points plus a list of faces. To handle
vtkPolyhedron, SetCells() support a special input cellConnectivities format
(numCellFaces, numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...)
The functions use vtkPolyhedron::DecomposeAPolyhedronCell() to convert
polyhedron cells into standard format.
-------------------------------------



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list