[vtkusers] Track and record user given rotations using a trackball?
Ambar C
ambarc at gmail.com
Fri Oct 1 22:30:06 EDT 2010
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
More information about the vtkusers
mailing list