[vtkusers] Reset vtkActor rotation?

Shashwath T.R. trshash at gmail.com
Tue Mar 22 21:41:36 EDT 2011


Hi,

Instead of rotating the actor directly, you could  try setting a user
transform to it (SetUserTransform) and manipulating that instead. Now,
you'll have control over the transform that you set, and if you call
Identity() on it, it should reset to original
translation/scaling/rotation...

That's what I'm doing...

Regards,
Shash

2011/3/22 Vinicius Rogério Araujo Silva <vinicius.ras at gmail.com>

> Hi all,
>
> I've made a rotation to a vtkActor like that:
>
> myActor->RotateWXYZ(45,1,0,0);
>
> After it has been rotated, seems the subsequent rotations are applied over
> the current rotation angle.
> How do I reset the rotation of my actor to the default value?
>
> What I want to do is to allow the user to define an angle and make the
> actor rotate from its original position to that angle.
> But it seems that the angles are acumulating. Like, if the user enters 45
> degrees, the actor rotates 45 degrees.
> But then, if the user types, let's say, 30, it seems the angles are summed
> and the actor gets a 75 degrees rotation.
> How to solve that?
>
> Thanks.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110323/f761d9bd/attachment.htm>


More information about the vtkusers mailing list