[vtkusers] [Q] vtkIdList and marching.tcl

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri May 24 00:06:54 EDT 2002


>>>>> "MN" == Michael Norton <mnorton at cisco.com> writes:

    MN> hi, I am coming up to speed with vtk. In the example source
    MN> code,

    MN> vtkFloatArray Scalars Scalars InsertNextValue 1.0 Scalars
    MN> InsertNextValue 0.0 Scalars InsertNextValue 0.0 Scalars
    MN> InsertNextValue 1.0 Scalars InsertNextValue 0.0 Scalars
    MN> InsertNextValue 0.0 Scalars InsertNextValue 0.0 Scalars
    MN> InsertNextValue 0.0

    MN> Why do I need this code? What is it defining?

It defines scalar values for each of the points.  This is set further
down in the code to the PointData of the unstructured grid.

    MN> vtkIdList Ids Ids InsertNextId 0 Ids InsertNextId 1 Ids
    MN> InsertNextId 2 Ids InsertNextId 3 Ids InsertNextId 4 Ids
    MN> InsertNextId 5 Ids InsertNextId 6 Ids InsertNextId 7

    MN> What is this code doing?

The ID list defines the connectivity between points.  This
connectivity defines a "cell" of the unstructured grid.  In this case
there is only one cell that consists of 12 points.

prabhu



More information about the vtkusers mailing list