<div dir="ltr">Dear Carlos, <div><br></div><div>Thanks for this information. I will add this clarification. I am wondering if we should use degrees as well. </div><div><br></div><div>Thanks,</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Apr 1, 2013 at 10:28 AM, Carlos <span dir="ltr"><<a href="mailto:ves@calculoandamios.com" target="_blank">ves@calculoandamios.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ES" link="blue" vlink="purple"><div><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I have been using:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">  <span style="color:green">/// Set rotation as described by angle (in radians) and axis</span><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">  <span style="color:green">/// ( axis(x, y, z), angle )</span><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none">
<span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">  <span style="color:blue">void</span> setRotation(<span style="color:blue">const</span> vesVector4f &rotation); <u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">in vesActor class and sometimes it has a strange behavior.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I wrongly assumed that the behavior was similar to the RotateWXYZ method in vtkActor but there are some differences:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">The first one is that the angle in setRotation is in radians instead of Degrees. This is explained in the comments so it is OK.<u></u><u></u></span></p>
<p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">The second one is that the axis in setRotation must be normalized. This is explained in the AngleAxis.h file from the Eigen package but not in vesActor. <u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">  <span style="color:green">/** Constructs and initialize the angle-axis rotation from an \a angle in radian</span><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green">    * and an \a axis which \b must \b be \b normalized.</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green">    *</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green">    * \warning If the \a axis vector is not normalized, then the angle-axis object</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:green">    </span><span style="font-size:9.5pt;font-family:Consolas;color:green">*          represents an invalid rotation. */<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">If the axis is not normalized, then the rotation is done without errors but in a wrong way, affecting to the rotation angle and the scale of the object (I have not checked how but this is something I have experienced).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">I think it would be helpful if this comment is also included in the comments of the setRotation declaration (or maybe normalize the axis before passing it to the Eigen package).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Best Regards,<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p>
<span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Carlos<u></u><u></u></span></p></font></span></div></div><br>_______________________________________________<br>

Ves mailing list<br>
<a href="mailto:Ves@public.kitware.com">Ves@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer         <br>| Kitware Inc.            <br>| <a href="http://www.kitware.com">www.kitware.com</a>    
</div>