]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/tgdb/obj.cxx
Logging: quiet down STG parsing.
[simgear.git] / simgear / scene / tgdb / obj.cxx
index cdfd64f671c227d5151752f49d2349e4f0bb9063..74b4a0718be358aa2ab5206d3a10c59d43ab7456 100644 (file)
@@ -474,12 +474,7 @@ struct SGTileGeometryBin {
       
       std::vector<SGVec3f>::iterator j;
       for (j = randomPoints.begin(); j != randomPoints.end(); ++j) {
-
-        // Apply a random scaling factor and texture index.
-        float scale = (mt_rand(&seed) + mt_rand(&seed)) / 2.0f + 0.5f;
-        int v = (int) (mt_rand(&seed) * mat->get_tree_varieties());
-        if (v == mat->get_tree_varieties()) v--;         
-        randomForest.insert(*j, v, scale);
+        randomForest.insert(*j);
       }
     }
   }
@@ -621,7 +616,7 @@ SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool
           // location, and then apply the rotation matrix created
           // above, with an additional random heading rotation if appropriate.
           osg::Matrix transformMat;
-          transformMat = osg::Matrix::translate(obj.position.osg());
+          transformMat = osg::Matrix::translate(toOsg(obj.position));
           if (obj.model->get_heading_type() == SGMatModel::HEADING_RANDOM) {
             // Rotate the object around the z axis.
             double hdg = mt_rand(&seed) * M_PI * 2;
@@ -763,8 +758,8 @@ SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool
   // The toplevel transform for that tile.
   osg::MatrixTransform* transform = new osg::MatrixTransform;
   transform->setName(path);
-  transform->setMatrix(osg::Matrix::rotate(hlOr.osg())*
-                       osg::Matrix::translate(center.osg()));
+  transform->setMatrix(osg::Matrix::rotate(toOsg(hlOr))*
+                       osg::Matrix::translate(toOsg(center)));
   transform->addChild(terrainGroup);
   if (lightGroup->getNumChildren() > 0) {
     osg::LOD* lightLOD = new osg::LOD;