<!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> </DIV>
<DIV><FONT face=Arial size=2>once more I try to solve the
vtkActor->SetUserMatrix - Problem. The first time vtkActor->SetUserMatrix
or vtkActor->SetUserTransform is called - it works. But each time I
call it again with a modified matrix nothing happens. 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> </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> </DIV>
<DIV><FONT face=Arial size=2>Regards - Peter.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </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> vtkRenderer* ren = vtkRenderer::New();<BR> vtkRenderWindow*
renWin = vtkRenderWindow::New();<BR> vtkActor* actor =
vtkActor::New();<BR> vtkCubeSource * cube =
vtkCubeSource::New();<BR> vtkPolyDataMapper* mapper =
vtkPolyDataMapper::New();</DIV>
<DIV> renWin->AddRenderer(ren);<BR> ren->AddActor(actor);</DIV>
<DIV> mapper->SetInput(cube->GetOutput());<BR> actor->SetMapper(mapper);<BR> renWin->Render();</DIV>
<DIV> </DIV>
<P>// ---------- Loop Rotation over the Z-axis
-----------------//<BR> <BR> for(float i = 45; i < 360;
i+=45)<BR> {<BR> vtkTransform* transform =
vtkTransform::New();<BR> transform->RotateZ(i);<BR> actor->SetUserMatrix(transform->GetMatrix());<BR> actor->GetProperty()->SetColor((float)i/360,
(float)i/360,
(float)i/360);<BR> renWin->Render();<BR> transform->Delete();<BR> for(int
ii = 0; ii<30000; ii++); </P>
<P> }</P>
<DIV>}</DIV></BODY></HTML>