<div class="gmail_quote">On Tue, Mar 2, 2010 at 8:06 AM, Giancarlo Amati <span dir="ltr"><<a href="mailto:ilferraresebono@hotmail.it">ilferraresebono@hotmail.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
Hello vtkurs<br><br>this is my question:<br><br>let say that i have a sequence of transformation matrices 4x4, let's say A, B, C. And I have an actor.<br>I use the SetUserTransform in this way:<br><br>act->SetUserTransform(A);<br>
act->SetUserTransform(B);<br>act->SetUserTransform(C);<br><br>now, my questions are:<br><br>1) the resulting position of the actor is it resulting from the multiply of A * B * C?<br>2) the position of the actor is it the last applied?<br>
3) if I want to retrieve the connected dataset, is it a transformed dataset or the original one?<br><br><br>Many thanks!<br>Giancarlo<br></div><div><br></div></blockquote><div class="gmail_quote"><br></div><div class="gmail_quote">
Hi Giancarlo,</div><div class="gmail_quote"><br></div><div class="gmail_quote">It is possible to answer some of these things by looking at the source code. I will describe the process below:</div><div class="gmail_quote">
<br></div><div class="gmail_quote">1) </div><div class="gmail_quote"><br></div><div class="gmail_quote">By going to the list of classes:</div><div class="gmail_quote"><a href="http://www.vtk.org/doc/nightly/html/classes.html">http://www.vtk.org/doc/nightly/html/classes.html</a></div>
<div class="gmail_quote">then clicking on vtkActor:</div><div class="gmail_quote"><a href="http://www.vtk.org/doc/nightly/html/classvtkActor.html">http://www.vtk.org/doc/nightly/html/classvtkActor.html</a></div><div class="gmail_quote">
I noticed that there is no SetUserTransform listed as a function. Therefore, it must be a function of a super class. To see ALL functions that can be called on a vtkActor, you can click "List of all members" (half way down the page).</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">The SetUserTransform function is then found, and it belongs to vtkProp3D. I opened Rendering/vtkProp3D.cxx and found SetUserTransform. It looks like it doesn't do any multiplying, rather, it simply sets the current transform to the transform that you pass it.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">2) Yes, The position of the actor should be the position it is currently in.</div><div class="gmail_quote"><br></div><div class="gmail_quote">3) When you retrieve the connected data set, it is NOT transformed (it is indeed the original). This is the process when you transform the actor. If you want to transform the actual data set, you should use vtkTransformFilter.</div>
<div class="gmail_quote"><br></div>Hope that helps,<br><br>David</div>