<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><P>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 ?</P><P></P><P>vtkCellArray *cellArrayNorm = vtkCellArray::New();<BR>vtkPoints *points2 = vtkPoints::New();<BR>points2-&gt;Allocate(2*m_NumOfVertices*3*sizeof(float));<BR><BR></P><P>for(int k=0; k&lt;m_NumOfVertices; k++)<BR></P>         {<BR>                 float* fp = VerticesP[k].coords; // Get vertex coords.<BR><P>                 float* fpN = NormP[k].coords; // Get vertex normal.<BR></P>                 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><P><BR></P><P>         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></P><P></P><P>Thanks.</P><P></P></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>