<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi, thanks for the reply.<br>Actually the setUsermatrix is what I have done...but still no results in my screen. This is my code:<br><br>&nbsp;&nbsp;&nbsp; vtkActor *tmpAct; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _pickedActors = _picker-&gt;GetActors();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _pickedActors-&gt;InitTraversal();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tmpAct = _pickedActors-&gt;GetNextItem();<br><br>while (tmpAct != 0){<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tmpAct-&gt;SetUserMatrix(m);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tmpAct = _pickedActors-&gt;GetNextItem();&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>where _pickedActors is a vtkActorCollections and _picker is a vtkPicker. m is a vtkMatrix4x4 that I initialised as<br>1 0 0 0<br>0 1 0 0 <br>0 0 1 55<br>0 0 0 1<br><br>so I would see a translation of 55 in the Z.<br><br>GC.<br><br><hr id="stopSpelling">Date: Tue, 31 Mar 2009 12:30:14 +0200<br>From: J.S.Wijnhout@lumc.nl<br>To: vtkusers@vtk.org<br>Subject: Re: [vtkusers] vtkTransformFilter<br><br>



<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>Hi,<br>
<br>
You solution doesn't work because do you not connect the output of trF to the mapper of the actor.
Btw, if you want to apply a user defined transformation matrix to your actor, simply use:
vtkActor::SetUserMatrix.<br>
<br>
best,<br>
Jeroen<br>
<div><font size="2"></font>&nbsp;</div><br><div class="EC_OutlookMessageHeader" dir="ltr" align="left" lang="en-us"> <hr> <font size="2" face="Tahoma"> <b>From:</b> vtkusers-bounces@vtk.org [mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b> Giancarlo Amati<br> <b>Sent:</b> Monday, March 30, 2009 7:03 PM<br> <b>To:</b> vtkusers@vtk.org<br>  <b>Subject:</b> [vtkusers] vtkTransformFilter<br>   </font><br></div><div></div>
Hi everybody,<br><br>I
have an object picked usint VTkpicker....and I can recover its actor. now, I also define a
vtkMatrix4x4 which is a rigid transformation matrix.<br>I want to apply that transformation to the object and I wrote this:<br><br>vtkTransform *tr = vtkTransform::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tr-&gt;SetMatrix(m);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tr-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkTransformFilter *trF = vtkTransformFilter::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; trF-&gt;SetInput(tmpAct-&gt;GetMapper()-&gt;GetInput());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; trF-&gt;SetTransform(tr);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; trF-&gt;Update();<br><br>where tmpAct is the actor picked by the picker.<br>So I thought that after refreshing the visualization I should see the object modified, but it doesn't....so where's the trick?<br><br>Kind Regards.<br>Giancarlo<br><br><hr>La tua immagine personale dinamica per Messenger? <a href="http://clk.atdmt.com/GBL/go/136430519/direct/01/">Creala gratis con Avatar Studio!</a><br /><hr />Scopri tutte le novità. <a href='http://clk.atdmt.com/GBL/go/136422322/direct/01/' target='_new'>Scarica Messenger 2009!</a></body>
</html>