From e71f3790ce48d9b2ecd41470dec14f800cda6fbc Mon Sep 17 00:00:00 2001 From: frohlich Date: Thu, 3 Sep 2009 20:13:24 +0000 Subject: [PATCH] Avoid the non const SGVec*::osg() method. Modified Files: SGTranslateTransform.cxx SGScaleTransform.cxx SGRotateTransform.cxx --- simgear/scene/model/SGRotateTransform.cxx | 12 ++++++------ simgear/scene/model/SGScaleTransform.cxx | 12 ++++++------ simgear/scene/model/SGTranslateTransform.cxx | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/simgear/scene/model/SGRotateTransform.cxx b/simgear/scene/model/SGRotateTransform.cxx index 4f18fe61..0b79f59e 100644 --- a/simgear/scene/model/SGRotateTransform.cxx +++ b/simgear/scene/model/SGRotateTransform.cxx @@ -142,21 +142,21 @@ bool RotateTransform_readLocalData(osg::Object& obj, osgDB::Input& fr) SGRotateTransform& rot = static_cast(obj); if (fr[0].matchWord("center")) { ++fr; - SGVec3d center; - if (fr.readSequence(center.osg())) + osg::Vec3d center; + if (fr.readSequence(center)) fr += 3; else return false; - rot.setCenter(center); + rot.setCenter(SGVec3d(center)); } if (fr[0].matchWord("axis")) { ++fr; - SGVec3d axis; - if (fr.readSequence(axis.osg())) + osg::Vec3d axis; + if (fr.readSequence(axis)) fr += 3; else return false; - rot.setCenter(axis); + rot.setCenter(SGVec3d(axis)); } if (fr[0].matchWord("angle")) { ++fr; diff --git a/simgear/scene/model/SGScaleTransform.cxx b/simgear/scene/model/SGScaleTransform.cxx index c677ec78..4907cbd9 100644 --- a/simgear/scene/model/SGScaleTransform.cxx +++ b/simgear/scene/model/SGScaleTransform.cxx @@ -107,21 +107,21 @@ bool ScaleTransform_readLocalData(osg::Object& obj, osgDB::Input& fr) SGScaleTransform& scale = static_cast(obj); if (fr[0].matchWord("center")) { ++fr; - SGVec3d center; - if (fr.readSequence(center.osg())) + osg::Vec3d center; + if (fr.readSequence(center)) fr += 3; else return false; - scale.setCenter(center); + scale.setCenter(SGVec3d(center)); } if (fr[0].matchWord("scaleFactor")) { ++fr; - SGVec3d scaleFactor; - if (fr.readSequence(scaleFactor.osg())) + osg::Vec3d scaleFactor; + if (fr.readSequence(scaleFactor)) fr += 3; else return false; - scale.setScaleFactor(scaleFactor); + scale.setScaleFactor(SGVec3d(scaleFactor)); } return true; } diff --git a/simgear/scene/model/SGTranslateTransform.cxx b/simgear/scene/model/SGTranslateTransform.cxx index 40d63634..8fc30d90 100644 --- a/simgear/scene/model/SGTranslateTransform.cxx +++ b/simgear/scene/model/SGTranslateTransform.cxx @@ -84,12 +84,12 @@ bool TranslateTransform_readLocalData(osg::Object& obj, osgDB::Input& fr) if (fr[0].matchWord("axis")) { ++fr; - SGVec3d axis; - if (fr.readSequence(axis.osg())) + osg::Vec3d axis; + if (fr.readSequence(axis)) fr += 3; else return false; - trans.setAxis(axis); + trans.setAxis(SGVec3d(axis)); } if (fr[0].matchWord("value")) { ++fr; -- 2.39.5