From d91f2c631d52b3a1950065358cce3086f7ce92df Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Nov 2005 09:57:40 +0000 Subject: [PATCH] Improved handling of core OSG being compile with float Matrices. --- examples/osgsimulation/osgsimulation.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/osgsimulation/osgsimulation.cpp b/examples/osgsimulation/osgsimulation.cpp index 588026bf8..e894e4a99 100644 --- a/examples/osgsimulation/osgsimulation.cpp +++ b/examples/osgsimulation/osgsimulation.cpp @@ -152,16 +152,18 @@ public: osg::EllipsoidModel* ellipsoid = csn->getEllipsoidModel(); if (ellipsoid) { - osg::Matrixd matrix; + osg::Matrix inheritedMatrix; for(i+=1; iasTransform(); - if (transform) transform->computeLocalToWorldMatrix(matrix, nv); + if (transform) transform->computeLocalToWorldMatrix(inheritedMatrix, nv); } + + osg::Matrixd matrix(inheritedMatrix); //osg::Matrixd matrix; ellipsoid->computeLocalToWorldTransformFromLatLongHeight(_latitude,_longitude,_height,matrix); - matrix.preMult(osg::Matrixd::rotate(_rotation)); + matrix.preMult(osg::Matrix::rotate(_rotation)); mt->setMatrix(matrix); }