[vtkusers] Too many actors

Malcolm Drummond malcolm at geovision.co.za
Wed Feb 11 13:43:50 EST 2004


Hi Yi-Yu

Try vtkHedgeHog or alternately use vtkGlyph3D with vtkLineSource

HTH
Malcolm

----- Original Message -----
From: "Yi-Yu Chou" <chouyiyu at hotmail.com>
To: <vtkusers at vtk.org>
Sent: Wednesday, February 11, 2004 5:50 PM
Subject: [vtkusers] Too many actors


> Dear all,
>
> I want to use line segments to represent a 3D vector field. However, I got
> a "lagging" problem
> when displaying this vector field, if the number of line segments is huge.
> I think it's because of using too many actors. If there any better method
> to do it ? Any suggestion will be appreciated.
> Below is my code :
>
> line = []
> line_mapper = []
> line_actor = []
> for i in range(0, vf_points.num):
> line.append(vtkLineSource())
> line[i].SetPoint1(vf_points.x[i],vf_points.y[i],vf_points.z[i])
> line[i].SetPoint2(vf_points.x[i] + vf.vx[i],vf_points.y[i] +
> vf.vy[i],vf_points.z[i] + vf.vz[i])
> line_mapper.append(vtkPolyDataMapper())
> line_mapper[i].SetInput(line[i].GetOutput())
> line_actor.append(vtkActor())
> line_actor[i].SetMapper(line_mapper[i])
> tar_renderer.AddActor(line_actor[i])
>
> _________________________________________________________________
> 立即申請 MSN Mobile 服務:在您的手機上收發 MSN Hotmail
> http://msn.com.tw/msnmobile
>
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list