[vtkusers] Too many actors

Yi-Yu Chou chouyiyu at hotmail.com
Wed Feb 11 10:50:28 EST 2004


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 




More information about the vtkusers mailing list