[vtkusers] drawing a polyline in 3D ?

R T doctorart at hotmail.com
Tue Aug 13 13:55:06 EDT 2002


You can use

    vtkLineSource line
      line SetPoint1  #your xyz....
       line SetPoint2  #your xyz1....
   vtkPolyDataMapper mapper
   mapper SetInput [line GetOutput]

or
  vtkPoints pts
     pts InsertPoint 0 1 1 1
     pts InsertPoint 1 2 2 2
  vtkLine  line
    [line GetPointIds] SetIds 0 0
   [line GetPointIds] SetIds 1 1

  vtkUnstructuredGrid myGrid
    myGrid InsertNextCell line
    myGrid SetPoints pts

vtkDatasetMapper mapper
  mapper SetInput myGrid


Best,
Roma

>From: Steffen Oeltze <Steffen.Oeltze at Student.Uni-Magdeburg.DE>
>To: VTK users <vtkusers at public.kitware.com>
>Subject: [vtkusers] drawing a polyline in 3D ?
>Date: Tue, 13 Aug 2002 15:17:49 +0200
>
>Der VTK-users,
>
>I'm getting confused by the VTK-help. How do I draw
>a simple line in 3D ?
>
>Regards,
>Steffen
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic. 
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




More information about the vtkusers mailing list