[vtkusers] unstructured grid -> SetCells

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Thu Nov 13 04:03:52 EST 2003


alan . wrote:
> Hi,
> dumb quest:
>  
> Can someone tell me the proper syntax for using the following method 
> which is found in vtkUnstructuredGrid:
>       *SetCells(int *types, **vtkCellArray* 
> <mk:@MSITStore:C:\Documents%20and%20Settings\TEMP\Desktop\VTKDoc-4.2.chm::/classvtkCellArray.html>* 
> *cells) *
>  
> ..particularly, what is *types ?? (I have a bunch of 
> *vtkQuadraticTetra*'s*)*

Alan,

It works almost like:

	vtkUnstructuredGrid::SetCells(int types, vtkCellArray *cells)

where types could be VTK_QUADRATIC_TETRA for example.


The difference is that you can specify different type, and not only one:

   int types[] = {VTK_QUADRATIC_TETRA, VTK_QUADRATIC_HEXAHEDRON, ...}

If you only have VTK_QUADRATIC_TETRA, then you are better using :

	vtkUnstructuredGrid::SetCells(int types, vtkCellArray *cells)

HTH
mathieu




More information about the vtkusers mailing list