[vtkusers] vtkTransform::GetOrientation()
George Kamucha
kamucha at hfm.e-technik.uni-kassel.de
Thu Feb 22 04:20:12 EST 2001
Hello Marco,
Your hint has really been helpful, I can now extract the transformations and above all, they are
now very accurate! Thanks a lot for your valuable information, that is exactly what I wanted know
and I highly appreciate!
Best regards
George
Marco Schlichting wrote:
> Hello George,
>
> my previous e-mail is maybe not exactely what you wanted to know.
> Ok, I will try again.
> To get the orientation from the transform object you should write
> somrthing as followed:
>
> float* orientation;
> oreintation = trans->GetOrientation();
>
> Than the orientation Rx, Ry, Rz can be accessed with orientation[0],
> orientation[1] and orientation[2].
>
> Further there is no mistake in the calculation of the matrixes. The
> solution is quite simple. If you rotate an object about 90 degrees
> about the X-axis. The Y-axis becomes the Z-axis and further
> calculation will have a different effect than you suppose. It
> is called Gimbal lock.
>
> see
> W. Schroeder ea.,
> The Visualization ToolKit, an object oriented approach to 3D graphics.
> Prentice Hall PTR, 1997
> page: 74
>
> CU MARCO
>
> PS: hope that will give you a hint
>
> George Kamucha wrote:
> >
> > Hi all,
> > I am still very eager to know what kind of an output one expects from
> > the vtkTransform::GetOrientation(), anybody out there who can help me in
> > this please? I tried something simple, below:
> >
> > vtkTransform *trans = vtkTransform::New();
> > trans->Identity();
> > trans->PostMultiply();
> > trans->RotateY(10);
> > trans->RotateX(20);
> > trans->RotateZ(30);
> > trans->GetOrientation();
> >
> > I was expecting the output to be just three elements (so I have read
> > from the Manpages!), but I instead got a matrix which after decomposing
> > ( a lot of work!), gave seemingly the following: Y=9.39, X=20.3 and
> > Z=33.4. So I am wondering, how come I am not getting the three angles as
> >
> > opposed to a matrix, and is the error usually this big?. Please assist.
> >
> > Regards
> >
> > George
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
>
> --
> -----------------------------------------------------------------------
> Marco Schlichting Philips Research Laboratories Eindhoven
> Building: WY p2.20 Prof. Holstlaan 4
> Phone: +31 40 27 42 63 8 5656 AA Eindhoven
> The Netherlands
> mailto:schlicht at natlab.research.philips.com
More information about the vtkusers
mailing list