<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face='Arial' color=#000000 size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>once more I try to solve the 
vtkActor-&gt;SetUserMatrix - Problem. The first time vtkActor-&gt;SetUserMatrix 
or vtkActor-&gt;SetUserTransform is called -&nbsp;it works. But&nbsp;each time I 
call it again with a modified matrix nothing happens. &nbsp;The work around (<A 
href="http://vtk.org/pipermail/vtkusers/2003-January/015391.html">http://vtk.org/pipermail/vtkusers/2003-January/015391.html</A>) 
doesn't work for me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Is there someone who could try my code on his 
machine? Maybe it is a local problem (WinXP, vtk4.2, VS6.0)?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards - Peter.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>// Rotates a cube 360° around the 
z-axis</FONT></DIV>
<DIV><FONT face=Arial size=2>// SetUserMatrix is called: works only the first 
time ;-(</FONT></DIV>
<DIV>#include "vtk.h"</DIV>
<DIV>void main(void)<BR>{</DIV>
<DIV>&nbsp;vtkRenderer* ren = vtkRenderer::New();<BR>&nbsp;vtkRenderWindow* 
renWin = vtkRenderWindow::New();<BR>&nbsp;vtkActor* actor = 
vtkActor::New();<BR>&nbsp;vtkCubeSource * cube = 
vtkCubeSource::New();<BR>&nbsp;vtkPolyDataMapper* mapper = 
vtkPolyDataMapper::New();</DIV>
<DIV>&nbsp;renWin-&gt;AddRenderer(ren);<BR>&nbsp;ren-&gt;AddActor(actor);</DIV>
<DIV>&nbsp;mapper-&gt;SetInput(cube-&gt;GetOutput());<BR>&nbsp;actor-&gt;SetMapper(mapper);<BR>&nbsp;&nbsp;renWin-&gt;Render();</DIV>
<DIV>&nbsp;</DIV>
<P>// ---------- Loop Rotation over the Z-axis 
-----------------//<BR>&nbsp;<BR>&nbsp;for(float i = 45; i &lt; 360; 
i+=45)<BR>&nbsp;{<BR>&nbsp;&nbsp;vtkTransform* transform = 
vtkTransform::New();<BR>&nbsp;&nbsp;transform-&gt;RotateZ(i);<BR>&nbsp;&nbsp;actor-&gt;SetUserMatrix(transform-&gt;GetMatrix());<BR>&nbsp;&nbsp;actor-&gt;GetProperty()-&gt;SetColor((float)i/360, 
(float)i/360, 
(float)i/360);<BR>&nbsp;&nbsp;renWin-&gt;Render();<BR>&nbsp;&nbsp;transform-&gt;Delete();<BR>&nbsp;&nbsp;for(int 
ii = 0; ii&lt;30000; ii++);&nbsp;</P>
<P>&nbsp;}</P>
<DIV>}</DIV></BODY></HTML>