Revision: 7036
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7036&view=rev
Author:   natepak
Date:     2008-09-24 16:27:10 +0000 (Wed, 24 Sep 2008)

Log Message:
-----------
Fixed loading of heightmaps, and errors in mapgeom

Modified Paths:
--------------
    code/gazebo/trunk/server/physics/MapGeom.cc
    code/gazebo/trunk/server/physics/MapGeom.hh
    code/gazebo/trunk/server/rendering/OgreAdaptor.cc

Modified: code/gazebo/trunk/server/physics/MapGeom.cc
===================================================================
--- code/gazebo/trunk/server/physics/MapGeom.cc 2008-09-23 10:25:38 UTC (rev 
7035)
+++ code/gazebo/trunk/server/physics/MapGeom.cc 2008-09-24 16:27:10 UTC (rev 
7036)
@@ -42,6 +42,8 @@
 
 using namespace gazebo;
 
+unsigned int MapGeom::geomCounter = 0;
+
 //////////////////////////////////////////////////////////////////////////////
 // Constructor
 MapGeom::MapGeom(Body *body)
@@ -57,6 +59,7 @@
   this->materialP = new ParamT<std::string>("material", "", 0);
   this->granularityP = new ParamT<int>("granularity", 5, 0);
   Param::End();
+
 }
 
 
@@ -152,7 +155,10 @@
     float ySize = (node->height) * this->scaleP->GetValue();
     float zSize = this->wallHeightP->GetValue();
 
-    stream << "<geom:box name='map_geom'>";
+    char geomName[256];
+    sprintf(geomName,"map_geom_%d",geomCounter++);
+
+    stream << "<geom:box name='" << geomName << "'>";
     stream << "  <mass>0.0</mass>";
     stream << "  <xyz>" << x << " " << y << " " << z << "</xyz>";
     stream << "  <rpy>0 0 0</rpy>";

Modified: code/gazebo/trunk/server/physics/MapGeom.hh
===================================================================
--- code/gazebo/trunk/server/physics/MapGeom.hh 2008-09-23 10:25:38 UTC (rev 
7035)
+++ code/gazebo/trunk/server/physics/MapGeom.hh 2008-09-24 16:27:10 UTC (rev 
7036)
@@ -146,6 +146,7 @@
     private: QuadNode *root;
 
     private: bool merged;
+    private: static unsigned int geomCounter;
   };
 
 
@@ -186,6 +187,7 @@
     public: bool leaf;
 
     public: bool valid;
+
   };
 
   /// \}

Modified: code/gazebo/trunk/server/rendering/OgreAdaptor.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2008-09-23 10:25:38 UTC 
(rev 7035)
+++ code/gazebo/trunk/server/rendering/OgreAdaptor.cc   2008-09-24 16:27:10 UTC 
(rev 7036)
@@ -205,8 +205,8 @@
   else
   {
     this->sceneType= SCENE_EXT;
-    //this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_CLOSE);
-    this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_FAR);
+    this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_CLOSE);
+    //this->sceneMgr = this->root->createSceneManager(Ogre::ST_EXTERIOR_FAR);
   }
 
   Param::Begin(&this->parameters);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to