[vtkusers] Simple Question regarding PolyLines

Audrius Stundzia adv_biologic at hotmail.com
Thu Mar 15 15:06:36 EST 2001

Dear vtk support / vtk users,

I have a trivial question regarding using polylines as opposed to lines.

The following mock code should help illustrate my question

vtkPoints    *myPolyLinePoints;
vtkCellArray *myCellArray;
vtkPolyData  *myPolyData;


pointID = myPolyLinePoints->InsertNextPoint( aPoint);
pointList[0] = pointID;

pointID = myPolyLinePoints->InsertNextPoint( bPoint);
pointList[1] = pointID;

pointID = myPolyLinePoints->InsertNextPoint( cPoint);
pointList[2] = pointID;

myCellArray->InsertNextCell( 3, pointList );

// I noticed that in the new release there are new versions of the method
// InsertNextCell( VTK_POLY_LINE, 3, pointList)
// Do I need to switch to this?

// Moving on,

myPolyData->SetPoints( myPolyLinePoints);

// For 2 point lines I've been using

myPolyData->SetLines( myCellArray);

// For 3 or more point polylines do I need to switch to

myPolyData->SetPolys( myCellArray);

// ?



Audrius Stundzia

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

More information about the vtkusers mailing list