[vtkusers] Drawing many lines in a 3D environment
Mathieu Malaterre
mathieu.malaterre at gmail.com
Mon Jun 30 18:10:22 EDT 2008
Bob,
If your dataset is simply a set of line, then create a vtkPolyData
out of the lines, and then simply render it as any vtkPolyData (mapper
-> actor -> render).
I would think that your highway is somewhat connected, if so then
use a vtkPolyLine, if this is not connected simlpy use vtkLine. In all
case you'll have to use vtkPolyData::InsertNextCell to create the
vtkPolyData.
HTH
-Mathieu
On Mon, Jun 30, 2008 at 11:25 PM, Bob Palank <bob at stlcc.org> wrote:
> So how would this change if I needed to draw 100 lines and I knew the 3D
> coordinates of each line?
> Bob
>
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
> Of Shakes
> Sent: Monday, June 30, 2008 3:32 PM
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] Drawing lines in a 3D environment
>
> Hi Dmitri,
>
> Yes there is in my experience. Use the class vtkLineSource. It would
> look similar to:
>
> line = vtkLineSource::New();
> mapper = vtkPolyDataMapper::New();
> actor = vtkActor::New();
>
> line->SetPoint1(0,0,0);
> line->SetPoint2(0,2,0);
> line->Update();
>
> mapper->SetInput(line->GetOutput());
> mapper->Update();
>
> actor->SetMapper(mapper);
>
> Then ur usual vtk render stuff. Hope that helps.
>
> Cheers
> Shakes
>
> Dmitri Danewitz wrote:
>>
>> Hello!
>>
>>
>>
>> I´ve a 3D highway network (made of polygons) and would like to ask if
>> there is a possibility to draw lines (by x,y,z coordinates) in.
>>
>>
>>
>> Greets
>>
>> Dmitri
>>
>>
>> ------------------------------------------------------------------------
>> Gesendet von Yahoo! Mail
>>
> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/
> evt=52427/*http://de.overview.mail.yahoo.com>.
>>
>> Dem pfiffigeren Posteingang.
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.101 / Virus Database: 270.4.3/1526 - Release Date: 6/30/2008
> 8:43 AM
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Mathieu
More information about the vtkusers
mailing list