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

Robert Osfield robert.osfield at gmail.com
Tue Mar 4 00:56:17 PST 2008


On Tue, Mar 4, 2008 at 6:19 AM, Roni Rosenzweig <roniros at gmail.com> 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 osg::Vec3d.
> when I switched to:
> getCamera()->setViewMatrix(osg::Matrixd::lookat(eye, center, up)) (which
> receives osg::Vec3d)
> the problem was completely solved.
>
> Is there a reason why setViewMatrixAsLookat doesn't receive osg::Vec3d??

An oversight...  I'll add it in now as an option.

Robert.


More information about the osg-users mailing list