<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV id="yiv1724467819"><P>Actually, the lines I have to draw are too many (more than 100.000). So I don't think drawing each line with a different actor would be a good idea. Isn't there any way to define all the lines in a single object and then render them with one actor ?</P><P>I thought that "vtkCellArray" would do the job, but I guess I was wrong. Perhaps I'm missing sth...<BR></P><BR>--- Στις <B>Δευτ., 19/01/09, ο/η Andre Gouws <I>&lt;andre@ynic.york.ac.uk&gt;</I></B> έγραψε:<BR><BLOCKQUOTE style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;">Από: Andre Gouws &lt;andre@ynic.york.ac.uk&gt;<BR>Θέμα: Re: [vtkusers] vtkAVIWriter problem.<BR>Προς: kkelgeor@yahoo.gr<BR>Κοιν.: vtkusers@vtk.org<BR>Ημερομηνία: Δευτέρα, 19 Ιανουάριος 2009, 9:44<BR><BR><PRE>I usually
 just use vtkLineSource (has SetPoint1 and SetPoint2 calls once you
have calculated the positions) .. example from the vtk source (Python sorry)

rake = vtk.vtkLineSource()
rake.SetPoint1(15, -5, 32)
rake.SetPoint2(15, 5, 32)
rake.SetResolution(21)

..... addmapper ...

..... addactor ... etc.


&gt; This is the private VTK discussion list.
&gt; Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
&gt; Follow this link to subscribe/unsubscribe:
&gt; http://www.vtk.org/mailman/listinfo/vtkusers
&gt;   <BR>i think vtkLineRepresentation  (or vtkLinewidget) is a better way to draw lines in a scene…you must set the properties of the line the  way you like, add it to the renderer  and simply set the coordinates(in world coordinates) of two end points of the line …<BR><BR>====================================================<BR><BR>Hi. I need to render some vectors in 3D space and I've decided to draw them as lines. However my code doesn't seem to work (I see nothing). Does anyone know why ?<BR><BR><BR>vtkCellArray *cellArrayNorm = vtkCellArray::New();<BR>vtkPoints *points2 = vtkPoints::New();<BR>points2-&gt;Allocate(2*m_NumOfVertices*3*sizeof(float));<BR><BR><BR>for(int k=0; k&lt;m_NumOfVertices; k++)<BR>  {<BR>  float* fp = VerticesP[k].coords; // Get vertex coords.<BR><BR>  float* fpN = NormP[k].coords; // Get vertex normal.<BR>  points2-&gt;SetPoint(k, fp); // Set 1st point<BR>  points2-&gt;SetPoint(m_NumOfVertices + k, // Set 2nd point.<BR>  
    fp[0]+fpN[0], // x+dx<BR>      fp[1]+fpN[1], // y+dy<BR>      fp[2]+fpN[2]);// z+dz<BR>  // Set up new (line) cell and insert.<BR>  int pts[2] = {k, m_NumOfVertices+k};<BR>  cellArrayNorm-&gt;InsertNextCell(2, pts);<BR>  }<BR><BR><BR><BR>  vtkPolyData *polyDataNorm = vtkPolyData::New();<BR>  polyDataNorm-&gt;SetPoints(points2);<BR>  polyDataNorm-&gt;SetPolys(cellArrayNorm);<BR><BR>  vtkPolyDataMapper *polyDataMapperNorm = vtkPolyDataMapper::New();<BR>  polyDataMapperNorm-&gt;SetInput(polyDataNorm);<BR><BR>  ActorNorm-&gt;SetMapper(polyDataMapperNorm);<BR>  ren1-&gt;AddActor(ActorNorm);<BR><BR>  vtkProperty *prop = vtkProperty::New();<BR>  prop-&gt;SetColor(1.0, 0.0, 0.0);<BR>  ActorNorm-&gt;SetProperty(prop);<BR><BR>  points2-&gt;Delete();<BR>  cellArrayNorm-&gt;Delete();<BR>  polyDataNorm-&gt;Delete();<BR>  polyDataMapperNorm-&gt;Delete();<BR>  prop-&gt;Delete();<BR><BR>Thanks.<BR><BR></PRE></BLOCKQUOTE></DIV></td></tr></table><br>



      <hr size=1><font size=-1 face=Arial> 
Χρησιμοποιείτε Yahoo!<br> 
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων <br> 
<a href="http://login.yahoo.com/config/mail?.intl=gr">http://login.yahoo.com/config/mail?.intl=gr</a> </font>