[Ves] Documentation for SetRotation in vesActor

Carlos ves at calculoandamios.com
Mon Apr 1 10:28:59 EDT 2013


Hi,

 

I have been using:

 

  /// Set rotation as described by angle (in radians) and axis

  /// ( axis(x, y, z), angle )

  void setRotation(const vesVector4f &rotation); 

 

in vesActor class and sometimes it has a strange behavior.

 

I wrongly assumed that the behavior was similar to the RotateWXYZ method in
vtkActor but there are some differences:

 

.         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.

.         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. 

  /** Constructs and initialize the angle-axis rotation from an \a angle in
radian

    * and an \a axis which \b must \b be \b normalized.

    *

    * \warning If the \a axis vector is not normalized, then the angle-axis
object

    *          represents an invalid rotation. */

 

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).

 

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).

 

Best Regards,

 

Carlos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130401/f508e2d4/attachment-0001.html>


More information about the Ves mailing list