<P>
Hello Everybody,<BR>
Iam using vtk42 and vc++7.<BR>
Iam trying to resize a polygon at runtime.<BR>
I created a polygon made of triangle strips.<BR>
The coordinate points are in a vtkdoublearray and then Iam storing the values in vtkpoints.<BR>
Then the vtkcellarray hold the cell values, and Iam using vtkpolydata to hold the points and the cells.<BR>
Iam using vtkpolydatamapper to map the data and then a vtkactor.<BR>
In a while loop after rendering for sometime (iam not using interactor), I change the coordinates of the <BR>
polygon in the vtkdoublearray.Then I update the mapper.<BR>
BUT the polygon is not resized, I dont know why. Can someone please tell me why its not happening and correct it please.<BR>
<BR>
Thank you,<BR>
David Michell<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
void&nbsp; main( )<BR>
{<BR>
&nbsp; <BR>
 vtkOpenGLRenderer *rn=vtkOpenGLRenderer::New();&nbsp;  <BR>
 vtkWin32RenderWindowInteractor *ract;<BR>
<BR>
 vtkWin32OpenGLRenderWindow *win=vtkWin32OpenGLRenderWindow::New();<BR>
 win-&gt;AddRenderer(rn);<BR>
&nbsp; &nbsp; &nbsp; <BR>
 vtkPropAssembly&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;*m_assembly;<BR>
 m_assembly=vtkPropAssembly::New();<BR>
<BR>
tkDoubleArray&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;*m_coordinates;<BR>
vtkPoints&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;*m_points;<BR>
vtkCellArray&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;*m_cells;<BR>
vtkPolyData&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;*m_polys;<BR>
vtkPolyDataMapper&nbsp; &nbsp; &nbsp;*m_polyMapper;<BR>
vtkActor&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;*m_polyActor;<BR>
&nbsp; <BR>
&nbsp; &nbsp; &nbsp;<BR>
&nbsp; &nbsp; &nbsp;<BR>
&nbsp; <BR>
<BR>
m_coordinates =vtkDoubleArray::New();<BR>
m_coordinates-&gt;SetNumberOfComponents(3);<BR>
m_coordinates-&gt;SetNumberOfTuples(4);<BR>
<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
m_coordinates-&gt;SetTuple3(0,0.0,0.0,0.0);&nbsp; &nbsp; &nbsp;<BR>
m_coordinates-&gt;SetTuple3(1,0.0,5.0,0.0);<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
m_coordinates-&gt;SetTuple3(2,5.0,0.0,0.0);<BR>
m_coordinates-&gt;SetTuple3(3,5.0,5.0,0.0);<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
m_points =vtkPoints::New();<BR>
m_points-&gt;SetNumberOfPoints(4);<BR>
m_points-&gt;SetData(m_coordinates );<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
<BR>
&nbsp; &nbsp; &nbsp;<BR>
m_cells =vtkCellArray::New();<BR>
m_cells-&gt;InsertNextCell(4);<BR>
m_cells-&gt;InsertCellPoint(0);<BR>
m_cells-&gt;InsertCellPoint(2);<BR>
m_cells-&gt;InsertCellPoint(3);<BR>
m_cells-&gt;InsertCellPoint(1);<BR>
&nbsp; &nbsp; &nbsp;<BR>
&nbsp; &nbsp; &nbsp;<BR>
m_polys =vtkPolyData::New();<BR>
m_polys-&gt;SetPoints(m_points );<BR>
m_polys-&gt;SetPolys(m_cells);<BR>
<BR>
m_polyMapper =vtkPolyDataMapper::New();<BR>
m_polyMapper-&gt;SetInput(m_polys );<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
m_polyActor =vtkActor::New();<BR>
m_polyActor-&gt;SetMapper(m_polyMapper );<BR>
m_polyActor-&gt;GetProperty()-&gt;SetColor(0.0,1.0,0.0);<BR>
m_polyActor-&gt;GetProperty()-&gt;SetOpacity(0.25);<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
m_assembly-&gt;AddPart(m_polyActor);<BR>
rn-&gt;AddActor(m_assembly);<BR>
 <BR>
<BR>
unsigned long x;<BR>
<BR>
while (true)<BR>
{<BR>
for (x=0;x&lt;300;x++);<BR>
 win-&gt;Render();<BR>
&nbsp;  <BR>
 //here iam changing the coordiantes <BR>
 m_coordinates-&gt;SetTuple3(0,0.0,0.0,0.0);&nbsp; &nbsp; &nbsp;<BR>
 m_coordinates-&gt;SetTuple3(1,0.0,5.0,0.0);&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<BR>
 m_coordinates-&gt;SetTuple3(2,8.0,0.0,0.0);<BR>
 m_coordinates-&gt;SetTuple3(3,8.0,5.0,0.0);<BR>
<BR>
 m_polyMapper-&gt;Update();<BR>
<BR>
}<BR>
&nbsp;  <BR>
 <BR>
}<BR>
<BR>

</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=0 VSPACE=0 HSPACE=0 HEIGHT=74 WIDTH=496></a>