Re: [osg-users] double vs. float precision in camera position + osg::MatrixTransform question

2008-03-04 Thread Robert Osfield
On Tue, Mar 4, 2008 at 6:19 AM, Roni Rosenzweig [EMAIL PROTECTED] wrote: Hi Robert I found the problem and fixed it: Turns out is wasn't the MatrixTransform but how I set the camera position. I used: getCamera()-setViewMatrixAsLookat(eye, center, up) which receives osg::Vec3f instead of

Re: [osg-users] double vs. float precision in camera position + osg::MatrixTransform question

2008-03-04 Thread Robert Osfield
On Tue, Mar 4, 2008 at 8:56 AM, Robert Osfield [EMAIL PROTECTED] wrote: An oversight... I'll add it in now as an option. I've just tweak Camera::setViewAsLookAt(..) so that it now uses Vec3d rather than Vec3, and have checked in this change. ___

Re: [osg-users] double vs. float precision in camera position +osg::MatrixTransform question

2008-03-04 Thread Roni Rosenzweig
Thanks :-) Roni - Original Message - From: Robert Osfield [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, March 04, 2008 10:56 AM Subject: Re: [osg-users] double vs. float precision in camera position +osg::MatrixTransform question On Tue

Re: [osg-users] double vs. float precision in camera position + osg::MatrixTransform question

2008-03-03 Thread Robert Osfield
Hi Roni, The OSG defaults to using Matrxd for the Matrix definition. The MatrixManipulators generally use doubles internally as well. All for the reason of avoid problems with precision. The intersection code can be a problem area though as its currently done in floats, other than this

Re: [osg-users] double vs. float precision in camera position + osg::MatrixTransform question

2008-03-03 Thread Roni Rosenzweig
Hi Robert I found the problem and fixed it: Turns out is wasn't the MatrixTransform but how I set the camera position. I used: getCamera()-setViewMatrixAsLookat(eye, center, up) which receives osg::Vec3f instead of osg::Vec3d. when I switched to:

[osg-users] double vs. float precision in camera position + osg::MatrixTransform question

2008-03-02 Thread Roni Rosenzweig
Hello I made a small demo using osg 2.2, of an object moving on a terrain with a camera looking at it from above, and lowering towards it. When the location of the object+camera is near the (0,0,0) the demo works smoothly. However when their location is far (for example at location (3, 5000,