[osg-users] Matrix & Quat precision
Vincent Bourdier
vincent.bourdier at gmail.com
Thu Mar 27 01:57:24 PDT 2008
Hi Robert,
For the moment I use a relative calculation (I compute on each frame
depending on the last frame's position).
I suppose that computing in absolute mode could be better... but I would be
more difficult to implement.
Thanks Robert, I'll will try this if I have some time...
One more question : If there any conversion between Quat and Matrix, or Quat
and Vector, or Vector and Matrix which can not be precise ? I mean some
conversion function to avoid for example in the goal of beeing always
precise ?
Regards,
Vincent
2008/3/27, Robert Osfield <robert.osfield at gmail.com>:
>
> Hi Vincet,
>
> Even with doubles there are still precisions issue, just much smaller
> than with floats. If you are using a iterative calculation then if
> you aren't care the errors could accumulate until their become
> visable. The best thing to do is to avoid an iterative calculation
> and calculate the new camera position based on the position of the
> node in the scene on each frame.
>
> Robert.
>
>
> On Thu, Mar 27, 2008 at 8:38 AM, Vincent Bourdier
> <vincent.bourdier at gmail.com> wrote:
> > Hi all,
> >
> > I'm currently making a new Manipulator inherited from MatrixManipulator.
> >
> > The specificity is : On the call of a function, the manipulator (camera)
> > have to follow a node which is moving. I mean that the camera have to be
> > exactly immobile relative to the moving node.
> > For that i've used Matrix, Vec3 and Quat.
> >
> > All looks great, but after 10 minutes of running, I can see that a
> little
> > moving difference between the node and the camera... if the node rotate
> > about 2 or 3 axis, the difference is more important...
> >
> > Using Vec3d, Quat and Matrixd, is there any reason for this lack of
> > precision ? Or is it my method which is not good... ?
> >
> > Thanks.
> >
> > Regards,
> > Vincent.
> >
>
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080327/db017a59/attachment.htm
More information about the osg-users
mailing list