<div dir="ltr">Hi,<div>The implementation of the rotation transform are as follows (from vtkTransform.h file : URL  <a href="https://github.com/Kitware/VTK/blob/master/Common/Transforms/vtkTransform.h">https://github.com/Kitware/VTK/blob/master/Common/Transforms/vtkTransform.h</a>)</div><div><br></div><div><table class="" style="border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-family:Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';font-size:13px;line-height:18.2px"><tbody><tr><td id="LC94" class="" style="padding:0px 10px;vertical-align:top;overflow:visible;word-wrap:normal"> <span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(167,29,93)"> void</span> <span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(121,93,163)">RotateX</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">(</span></font><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(167,29,93)">double</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"> angle) { </span></font><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(237,106,67)">this</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">-></span></font><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(0,134,179)">RotateWXYZ</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">(angle, </span></font><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(0,134,179)">1</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">, </span></font><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(0,134,179)">0</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">, </span></font><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;color:rgb(0,134,179)">0</span><font face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">); };
</span></font><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px"> </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(167,29,93)">void</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px"> </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(121,93,163)">RotateY</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">(</span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(167,29,93)">double</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px"> angle) { </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(237,106,67)">this</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">-></span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">RotateWXYZ</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">(angle, </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">0</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">, </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">1</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">, </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">0</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">); };
</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px"> </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(167,29,93)">void</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px"> </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(121,93,163)">RotateZ</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">(</span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(167,29,93)">double</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px"> angle) { </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(237,106,67)">this</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">-></span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">RotateWXYZ</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">(angle, </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">0</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">, </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">0</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">, </span><span class="" style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px;color:rgb(0,134,179)">1</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;white-space:pre;line-height:18.2px">); };

</span>Therefore, how there going to be a difference between <br><br>actor->RotateX(45);<br>actor->RotateY(45);<br><br>and <br><br>actor->RotateWXYZ(45, 1, 0, 0);<br>actor->RotateWXYZ(45, 0, 1, 0);<br><br>Can anyone please explain this a bit? David, Is there any example of the SetUserMatrix() available to learn about it?<br><br>Thanks,<br>Chiranjib</td></tr></tbody></table></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 10, 2015 at 10:38 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Drak,<div><br></div><div>Generally it's better design to build a transform or matrix and then apply that to the actor via SetUserTransform() or SetUserMatrix().  That way, the transform or matrix is available to you if you have to move other points or actors between coordinate systems.</div><div><br></div><div>To rotate around a point in space, you have to apply a translation to put that point at the origin, then do the rotation, and then translate back again.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888"> - David</font></span><span class=""><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 10, 2015 at 10:53 AM, Drak <span dir="ltr"><<a href="mailto:draktharrblorf@gmail.com" target="_blank">draktharrblorf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I should add that I'm using the vtkImageActor with a vtkImageData as a<br>
source. It seems that my point of rotation is the bottom left of my image<br></blockquote></div></div></span></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>