]> git.mxchange.org Git - simgear.git/commitdiff
Avoid the non const SGVec*::osg() method.
authorfrohlich <frohlich>
Thu, 3 Sep 2009 20:13:24 +0000 (20:13 +0000)
committerTim Moore <timoore@redhat.com>
Sat, 5 Sep 2009 15:01:58 +0000 (17:01 +0200)
Modified Files:
  SGTranslateTransform.cxx SGScaleTransform.cxx
  SGRotateTransform.cxx

simgear/scene/model/SGRotateTransform.cxx
simgear/scene/model/SGScaleTransform.cxx
simgear/scene/model/SGTranslateTransform.cxx

index 4f18fe61d9f49182e2abbbf28210ce537ca9d8d1..0b79f59ec051329bd827c29a78f6b66ee944eeb4 100644 (file)
@@ -142,21 +142,21 @@ bool RotateTransform_readLocalData(osg::Object& obj, osgDB::Input& fr)
     SGRotateTransform& rot = static_cast<SGRotateTransform&>(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;
index c677ec78e427ebd0b10be7375068b67ef527f202..4907cbd97e764bbbdf5aef16041b8bbc459bf64a 100644 (file)
@@ -107,21 +107,21 @@ bool ScaleTransform_readLocalData(osg::Object& obj, osgDB::Input& fr)
     SGScaleTransform& scale = static_cast<SGScaleTransform&>(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;
 }
index 40d636347c0320293d4c0e936df3d0472201e0f7..8fc30d907ff7d3e4d6d81d2ba79f6766caad46b3 100644 (file)
@@ -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;