]> git.mxchange.org Git - simgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Sun, 3 Jun 2007 18:28:14 +0000 (18:28 +0000)
committerfrohlich <frohlich>
Sun, 3 Jun 2007 18:28:14 +0000 (18:28 +0000)
scene/tgdb/SGOceanTile.cxx: add missing transform for the ocean
tile.

simgear/scene/tgdb/SGOceanTile.cxx

index 017436ea9a9a4f2183acb24c31fc68d85f3e2976..48b55562d1a2e0a81b4ccf01b3e79dff58136a31 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <osg/Geode>
 #include <osg/Geometry>
+#include <osg/MatrixTransform>
 #include <osg/StateSet>
 
 #include <simgear/bucket/newbucket.hxx>
@@ -126,6 +127,11 @@ osg::Node* SGOceanTile(const SGBucket& b, SGMaterialLib *matlib)
   geode->setName("Ocean tile");
   geode->addDrawable(geometry);
   geode->setStateSet(stateSet);
+
+  osg::MatrixTransform* transform = new osg::MatrixTransform;
+  transform->setName("Ocean");
+  transform->setMatrix(osg::Matrix::translate(cartCenter.osg()));
+  transform->addChild(geode);
   
-  return geode;
+  return transform;
 }