[vtkusers] Track and record user given rotations using a trackball?

Darshan Pai darshanpai at gmail.com
Sat Oct 2 17:47:36 EDT 2010


I think you will need to subclass the interactor and save the transform
matrix before it is destroyed .
I used to do that when I need to  add a new image to multiply with save
transformation thus having same FOV




On Fri, Oct 1, 2010 at 10:30 PM, Ambar C <ambarc at gmail.com> wrote:

> So that's what I was hoping to get - but the UserTransform seems to be
> a vtkLinearTransform (vtkTransform's parent) - and it doesn't have the
> translate and rotate functions. Also, my actor's position and
> orientation aren't changed at all no matter what I do with the
> trackball - is there something else I have to set or enable for the
> trackball to work? I really appreciate your help on this problem :)
>
> Best,
> Ambar
>
> On Fri, Oct 1, 2010 at 4:51 PM, David Doria <daviddoria at gmail.com> wrote:
> > On Fri, Oct 1, 2010 at 7:46 PM, Ambar C <ambarc at gmail.com> wrote:
> >>
> >> I understand the part about the Position and orientation being the
> >> fields that get changed by the trackball - so how would I go about
> >> incorporating those changes into the actual data?
> >
> > You could use this:
> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/TransformPolyData
> > and do
> > transform->PostMultiply();
> > transform->Translate(actor->GetPosition())
> > transform->Rotate(actor->GetOrientation())
> > Maybe someone else will chime in with a cleaner solution, but this should
> > work.
> > David
> _______________________________________________
> 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/20101002/81cff484/attachment.htm>


More information about the vtkusers mailing list