Revision: 8394
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8394&view=rev
Author:   natepak
Date:     2009-11-12 15:28:37 +0000 (Thu, 12 Nov 2009)

Log Message:
-----------
Got map shape to work again

Modified Paths:
--------------
    code/gazebo/trunk/server/physics/CMakeLists.txt
    code/gazebo/trunk/server/physics/Geom.cc
    code/gazebo/trunk/server/physics/MapShape.cc
    code/gazebo/trunk/server/physics/MapShape.hh
    code/gazebo/trunk/server/physics/TrimeshShape.cc
    code/gazebo/trunk/server/physics/bullet/BulletPhysics.cc
    code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.cc
    code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.hh
    code/gazebo/trunk/server/physics/bullet/CMakeLists.txt
    code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
    code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc
    code/gazebo/trunk/server/physics/ode/ODETrimeshShape.hh
    code/gazebo/trunk/server/rendering/UserCamera.cc
    code/gazebo/trunk/worlds/map.world

Modified: code/gazebo/trunk/server/physics/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/physics/CMakeLists.txt     2009-11-12 04:36:21 UTC 
(rev 8393)
+++ code/gazebo/trunk/server/physics/CMakeLists.txt     2009-11-12 15:28:37 UTC 
(rev 8394)
@@ -23,8 +23,8 @@
              RayShape.cc
              MultiRayShape.cc
              TrimeshShape.cc
+             MapShape.cc
              #HeightmapGeom.cc
-             #MapGeom.cc
 ) 
 
 set (headers BallJoint.hh
@@ -41,13 +41,13 @@
              Geom.hh
              BoxShape.hh
              CylinderShape.hh
-             #HeightmapShape.hh
-             #MapShape.hh
+             MapShape.hh
              PlaneShape.hh
              RayShape.hh
              MultiRayShape.hh
              SphereShape.hh
              TrimeshShape.hh
+             #HeightmapShape.hh
 )
 
 #add_library(gazebo_physics STATIC ${sources})

Modified: code/gazebo/trunk/server/physics/Geom.cc
===================================================================
--- code/gazebo/trunk/server/physics/Geom.cc    2009-11-12 04:36:21 UTC (rev 
8393)
+++ code/gazebo/trunk/server/physics/Geom.cc    2009-11-12 15:28:37 UTC (rev 
8394)
@@ -156,7 +156,7 @@
 void Geom::CreateBoundingBox()
 {
   // Create the bounding box
-  if (this->GetType() != Shape::PLANE)
+  if (this->GetType() != Shape::PLANE && this->GetType() != Shape::MAP)
   {
     Vector3 min;
     Vector3 max;

Modified: code/gazebo/trunk/server/physics/MapShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/MapShape.cc        2009-11-12 04:36:21 UTC 
(rev 8393)
+++ code/gazebo/trunk/server/physics/MapShape.cc        2009-11-12 15:28:37 UTC 
(rev 8394)
@@ -18,38 +18,39 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-/* Desc: Map geometry
+/* Desc: Map shape
  * Author: Nate Koenig
  * Date: 14 July 2008
- * CVS: $Id$
+ * SVN: $Id$
  */
 
 #include <iostream>
 #include <string.h>
 #include <math.h>
 
+#include "PhysicsEngine.hh"
 #include "GazeboConfig.hh"
 #include "OgreVisual.hh"
 #include "Image.hh"
-#include "BoxGeom.hh"
+#include "BoxShape.hh"
 #include "GazeboError.hh"
 #include "Simulator.hh"
 #include "Global.hh"
 #include "Body.hh"
-#include "MapGeom.hh"
+#include "Geom.hh"
+#include "MapShape.hh"
 
 using namespace gazebo;
 
-unsigned int MapGeom::geomCounter = 0;
+unsigned int MapShape::geomCounter = 0;
 
 //////////////////////////////////////////////////////////////////////////////
 // Constructor
-MapGeom::MapGeom(Body *body)
-    : Geom(body)
+MapShape::MapShape(Geom *parent)
+    : Shape(parent)
 {
+  this->type = Shape::MAP;
 
-  this->type = Geom::MAP;
-
   this->root = new QuadNode(NULL);
 
   Param::Begin(&this->parameters);
@@ -61,12 +62,13 @@
   this->granularityP = new ParamT<int>("granularity", 5, 0);
   Param::End();
 
+  this->visualNode = parent->GetVisualNode();
 }
 
 
 //////////////////////////////////////////////////////////////////////////////
 // Destructor
-MapGeom::~MapGeom()
+MapShape::~MapShape()
 {
   if (this->root)
     delete this->root;
@@ -85,15 +87,14 @@
 
 //////////////////////////////////////////////////////////////////////////////
 /// Update function.
-void MapGeom::UpdateChild()
+void MapShape::Update()
 {
 }
 
 
////////////////////////////////////////////////////////////////////////////////
 /// Load the heightmap
-void MapGeom::LoadChild(XMLConfigNode *node)
+void MapShape::Load(XMLConfigNode *node)
 {
-
   std::string imageFilename = node->GetString("image","",1);
 
   this->negativeP->Load(node);
@@ -139,7 +140,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 // Create the ODE boxes
-void MapGeom::CreateBoxes(QuadNode *node)
+void MapShape::CreateBoxes(QuadNode *node)
 {
   if (node->leaf)
   {
@@ -149,7 +150,7 @@
     std::ostringstream stream;
 
     // Create the box geometry
-    BoxGeom* newBox = new BoxGeom( this->body );
+    Geom *geom = 
this->physicsEngine->CreateGeom("box",this->parent->GetBody());
 
     XMLConfig *boxConfig = new XMLConfig();
 
@@ -166,7 +167,6 @@
     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>";
     stream << "  <size>" << xSize << " " << ySize << " " << zSize << "</size>";
@@ -180,7 +180,9 @@
 
     boxConfig->LoadString( stream.str() );
 
-    newBox->Load( boxConfig->GetRootNode()->GetChild() );
+    geom->Load( boxConfig->GetRootNode()->GetChild() );
+    geom->SetStatic(true);
+
     delete boxConfig;
   }
   else
@@ -195,7 +197,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 // Reduce the size of the quad tree
-void MapGeom::ReduceTree(QuadNode *node)
+void MapShape::ReduceTree(QuadNode *node)
 {
   std::deque<QuadNode*>::iterator iter;
 
@@ -254,7 +256,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 // Merege quad tree cells
-void MapGeom::Merge(QuadNode *nodeA, QuadNode *nodeB)
+void MapShape::Merge(QuadNode *nodeA, QuadNode *nodeB)
 {
   std::deque<QuadNode*>::iterator iter;
 
@@ -304,7 +306,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 // Construct the quad tree
-void MapGeom::BuildTree(QuadNode *node)
+void MapShape::BuildTree(QuadNode *node)
 {
   QuadNode *newNode = NULL;
   unsigned int freePixels, occPixels;
@@ -379,7 +381,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 // Get a count of pixels within a given area
-void MapGeom::GetPixelCount(unsigned int xStart, unsigned int yStart, 
+void MapShape::GetPixelCount(unsigned int xStart, unsigned int yStart, 
                                  unsigned int width, unsigned int height, 
                                  unsigned int &freePixels, 
                                  unsigned int &occPixels )
@@ -410,7 +412,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 /// Save child parameters
-void MapGeom::SaveChild(std::string &prefix, std::ostream &stream)
+void MapShape::Save(std::string &prefix, std::ostream &stream)
 {
   stream << prefix << *(this->negativeP) << "\n";
   stream << prefix << *(this->thresholdP) << "\n";

Modified: code/gazebo/trunk/server/physics/MapShape.hh
===================================================================
--- code/gazebo/trunk/server/physics/MapShape.hh        2009-11-12 04:36:21 UTC 
(rev 8393)
+++ code/gazebo/trunk/server/physics/MapShape.hh        2009-11-12 15:28:37 UTC 
(rev 8394)
@@ -24,8 +24,8 @@
  * CVS: $Id$
  */
 
-#ifndef MAPGEOM_HH
-#define MAPGEOM_HH
+#ifndef MAPSHAPE_HH
+#define MAPSHAPE_HH
 
 #include <deque>
 
@@ -88,22 +88,22 @@
   class QuadNode;
 
   /// \brief Map geom
-  class MapGeom : public Geom
+  class MapShape : public Shape
   {
     /// \brief Constructor
-    public: MapGeom(Body *body);
+    public: MapShape(Geom *parent);
 
     /// \brief Destructor
-    public: virtual ~MapGeom();
+    public: virtual ~MapShape();
 
     /// \brief Update function 
-    public: void UpdateChild();
+    public: void Update();
 
-    /// \brief Load the heightmap
-    protected: virtual void LoadChild(XMLConfigNode *node);
+    /// \brief Load the map
+    protected: virtual void Load(XMLConfigNode *node);
 
-    /// \brief Save child parameters
-    protected: void SaveChild(std::string &prefix, std::ostream &stream);
+    /// \brief Save parameters
+    protected: void Save(std::string &prefix, std::ostream &stream);
  
     /// \brief Build the quadtree
     private: void BuildTree(QuadNode *node);
@@ -148,6 +148,7 @@
 
     private: bool merged;
     private: static unsigned int geomCounter;
+    private: OgreVisual *visualNode;
   };
 
 

Modified: code/gazebo/trunk/server/physics/TrimeshShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/TrimeshShape.cc    2009-11-12 04:36:21 UTC 
(rev 8393)
+++ code/gazebo/trunk/server/physics/TrimeshShape.cc    2009-11-12 15:28:37 UTC 
(rev 8394)
@@ -45,12 +45,6 @@
   this->meshNameP = new ParamT<std::string>("mesh","",1);
   this->scaleP = new ParamT<Vector3>("scale",Vector3(1,1,1),0);
   Param::End();
-
-  /*this->numVertices = 0;
-  this->numIndices = 0;
-  this->vertices = NULL;
-  this->indices = NULL;
-  */
 }
 
 
@@ -122,24 +116,6 @@
       delete config;
     }
   }
-
-  /*const Mesh *mesh = meshManager->Load( **this->meshNameP );
-
-  if (!mesh)
-    gzthrow("Invalid mesh");
-
-  mesh->FillArrays(&this->vertices, &this->indices);
-
-  this->numIndices = mesh->GetIndexCount();
-  this->numVertices = mesh->GetVertexCount();
-
-  for (unsigned int i=0; i < this->numVertices; i++)
-  {
-    this->vertices[i*3+0] = this->vertices[i*3+0] * (**this->scaleP).x;
-    this->vertices[i*3+1] = this->vertices[i*3+1] * (**this->scaleP).y;
-    this->vertices[i*3+2] = this->vertices[i*3+2] * (**this->scaleP).z;
-  }
-  */
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: code/gazebo/trunk/server/physics/bullet/BulletPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/bullet/BulletPhysics.cc    2009-11-12 
04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/server/physics/bullet/BulletPhysics.cc    2009-11-12 
15:28:37 UTC (rev 8394)
@@ -29,7 +29,8 @@
 #include "BulletSphereShape.hh"
 #include "BulletBoxShape.hh"
 #include "BulletCylinderShape.hh"
-//#include "BulletTrimeshShape.hh"
+#include "BulletTrimeshShape.hh"
+#include "MapShape.hh"
 
 #include "BulletHingeJoint.hh"
 #include "BulletHinge2Joint.hh"
@@ -216,6 +217,12 @@
     case Shape::PLANE:
       shape = new BulletPlaneShape(geom);
       break;
+    case Shape::TRIMESH:
+      shape = new BulletTrimeshShape(geom);
+      break;
+    case Shape::MAP:
+      shape = new MapShape(geom);
+      break;
     default:
       gzthrow("Unable to create a geom of type[" << type << "]");
   }

Modified: code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.cc       
2009-11-12 04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.cc       
2009-11-12 15:28:37 UTC (rev 8394)
@@ -18,7 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-/* Desc: Trimesh geometry
+/* Desc: Trimesh shape
  * Author: Nate Keonig
  * Date: 21 May 2009
  * SVN: $Id:$
@@ -27,53 +27,36 @@
 #include "BulletPhysics.hh"
 #include "OgreVisual.hh"
 #include "Body.hh"
-#include "BulletTrimeshGeom.hh"
 #include "GazeboError.hh"
 #include "Simulator.hh"
 #include "OgreAdaptor.hh"
 
+#include "BulletTrimeshShape.hh"
+
 using namespace gazebo;
 
 //////////////////////////////////////////////////////////////////////////////
 // Constructor
-BulletTrimeshGeom::BulletTrimeshGeom(Body *body) 
-  : BulletGeom(body)
+BulletTrimeshShape::BulletTrimeshShape(Geom *parent) 
+  : TrimeshShape(parent)
 {
-  Param::Begin(&this->parameters);
-  this->meshNameP = new ParamT<std::string>("mesh","",1);
-  this->scaleP = new ParamT<Vector3>("scale",Vector3(1,1,1),0);
-  Param::End();
 }
 
 
 //////////////////////////////////////////////////////////////////////////////
 // Destructor
-BulletTrimeshGeom::~BulletTrimeshGeom()
+BulletTrimeshShape::~BulletTrimeshShape()
 {
-  delete this->meshNameP;
-  delete this->scaleP;
 }
 
 //////////////////////////////////////////////////////////////////////////////
 /// Update function.
-void BulletTrimeshGeom::Update()
+void BulletTrimeshShape::Update()
 {
-  BulletGeom::Update();
 }
 
 //////////////////////////////////////////////////////////////////////////////
 /// Load the trimesh
-void BulletTrimeshGeom::Load(XMLConfigNode *node)
+void BulletTrimeshShape::Load(XMLConfigNode *node)
 {
-  BulletGeom::Load(node);
 }
-
-//////////////////////////////////////////////////////////////////////////////
-/// Save child parameters
-void BulletTrimeshGeom::Save(std::string &prefix, std::ostream &stream)
-{
-  BulletGeom::Save(prefix, stream);
-  stream << prefix << *(this->meshNameP) << "\n";
-  stream << prefix << *(this->scaleP) << "\n";
-}
- 

Modified: code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.hh
===================================================================
--- code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.hh       
2009-11-12 04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/server/physics/bullet/BulletTrimeshShape.hh       
2009-11-12 15:28:37 UTC (rev 8394)
@@ -24,10 +24,10 @@
  * SVN: $Id:$
  */
 
-#ifndef BULLETTRIMESHGEOM_HH
-#define BULLETTRIMESHGEOM_HH
+#ifndef BULLETTRIMESHSHAPE_HH
+#define BULLETTRIMESHSHAPE_HH
 
-#include "BulletGeom.hh"
+#include "TrimeshShape.hh"
 
 namespace gazebo
 {
@@ -68,27 +68,19 @@
 
 
   /// \brief Triangle mesh geom
-  class BulletTrimeshGeom : public BulletGeom
+  class BulletTrimeshShape : public TrimeshShape
   {
     /// \brief Constructor
-    public: BulletTrimeshGeom(Body *body);
+    public: BulletTrimeshShape(Geom *parent);
 
     /// \brief Destructor
-    public: virtual ~BulletTrimeshGeom();
+    public: virtual ~BulletTrimeshShape();
 
     /// \brief Update function 
     public: void Update();
 
     /// \brief Load the trimesh
     public: virtual void Load(XMLConfigNode *node);
-
-    /// \brief Save child parameters
-    public: void Save(std::string &prefix, std::ostream &stream);
- 
-    ///  name of the mesh
-    private: ParamT<std::string> *meshNameP;
-
-    private: ParamT<Vector3> *scaleP;
   };
 
   /// \}

Modified: code/gazebo/trunk/server/physics/bullet/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/physics/bullet/CMakeLists.txt      2009-11-12 
04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/server/physics/bullet/CMakeLists.txt      2009-11-12 
15:28:37 UTC (rev 8394)
@@ -10,6 +10,7 @@
              BulletHinge2Joint.cc
              BulletUniversalJoint.cc
              BulletBallJoint.cc
+             BulletTrimeshShape.cc
              #BulletRayGeom.cc
 )
 

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2009-11-12 04:36:21 UTC 
(rev 8393)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2009-11-12 15:28:37 UTC 
(rev 8394)
@@ -50,6 +50,7 @@
 #include "ODEPlaneShape.hh"
 #include "ODETrimeshShape.hh"
 #include "ODEMultiRayShape.hh"
+#include "MapShape.hh"
 
 #include "ODEPhysics.hh"
 
@@ -340,6 +341,9 @@
     case Shape::TRIMESH:
       shape = new ODETrimeshShape(geom);
       break;
+    case Shape::MAP:
+      shape = new MapShape(geom);
+      break;
     default:
       gzerr(0) << "Unable to create geom of type["<<type<<"]\n";
   }

Modified: code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc     2009-11-12 
04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/server/physics/ode/ODETrimeshShape.cc     2009-11-12 
15:28:37 UTC (rev 8394)
@@ -50,7 +50,7 @@
 /// Update function.
 void ODETrimeshShape::Update()
 {
-  /*ODEGeom *ogeom = ((ODEGeom*)this->parent);
+  ODEGeom *ogeom = ((ODEGeom*)this->parent);
 
   /// FIXME: use below to update trimesh geometry for collision without using 
above Ogre codes
   // tell the tri-tri collider the current transform of the trimesh --
@@ -83,7 +83,6 @@
 
   dGeomTriMeshSetLastTransform( ogeom->GetGeomId(),
       *(dMatrix4*)( this->matrix_dblbuff + this->last_matrix_index * 16) );
-  */
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -97,56 +96,49 @@
 
   TrimeshShape::Load(node);
 
-  /*if (this->mesh->GetSubMeshCount() > 1)
-  {
-    printf("ODETrimesh submesh count >1\n");
-    return;
-  }*/
-
   mass = this->parent->GetMass();
 
   unsigned int i =0;
 
-    dTriMeshDataID odeData;
+  dTriMeshDataID odeData;
 
-    const SubMesh *subMesh = mesh->GetSubMesh(i);
-    if (subMesh->GetVertexCount() < 3)
-    {
-      printf("ODETrimesh invalid mesh\n");
-      return;
-    }
+  const SubMesh *subMesh = mesh->GetSubMesh(i);
+  if (subMesh->GetVertexCount() < 3)
+  {
+    gzerr(0) << "ODETrimesh invalid mesh\n";
+    return;
+  }
 
-    /// This will hold the vertex data of the triangle mesh
-    odeData = dGeomTriMeshDataCreate();
+  /// This will hold the vertex data of the triangle mesh
+  odeData = dGeomTriMeshDataCreate();
 
-    unsigned int numVertices = 0;
-    unsigned int numIndices = 0;
-    float *vertices = NULL;
-    unsigned int *indices = NULL;
+  unsigned int numVertices = 0;
+  unsigned int numIndices = 0;
+  float *vertices = NULL;
+  unsigned int *indices = NULL;
 
-    subMesh->FillArrays(&vertices, &indices);
+  subMesh->FillArrays(&vertices, &indices);
 
-    numIndices = subMesh->GetIndexCount();
-    numVertices = subMesh->GetVertexCount();
+  numIndices = subMesh->GetIndexCount();
+  numVertices = subMesh->GetVertexCount();
 
-    for (unsigned int j=0;  j < numVertices; j++)
-    {
-      vertices[j*3+0] = vertices[j*3+0] * (**this->scaleP).x;
-      vertices[j*3+1] = vertices[j*3+1] * (**this->scaleP).y;
-      vertices[j*3+2] = vertices[j*3+2] * (**this->scaleP).z;
-    }
+  for (unsigned int j=0;  j < numVertices; j++)
+  {
+    vertices[j*3+0] = vertices[j*3+0] * (**this->scaleP).x;
+    vertices[j*3+1] = vertices[j*3+1] * (**this->scaleP).y;
+    vertices[j*3+2] = vertices[j*3+2] * (**this->scaleP).z;
+  }
 
-    // Build the ODE triangle mesh
-    dGeomTriMeshDataBuildSingle( odeData,
-        (float*)vertices, 3*sizeof(float), numVertices,
-        (int*)indices, numIndices, 3*sizeof(int));
+  // Build the ODE triangle mesh
+  dGeomTriMeshDataBuildSingle( odeData,
+      (float*)vertices, 3*sizeof(float), numVertices,
+      (int*)indices, numIndices, 3*sizeof(int));
 
-    pgeom->SetSpaceId( dSimpleSpaceCreate(pgeom->GetSpaceId()) );
-    pgeom->SetGeom( dCreateTriMesh(pgeom->GetSpaceId(), odeData,0,0,0 ), true);
+  pgeom->SetSpaceId( dSimpleSpaceCreate(pgeom->GetSpaceId()) );
+  pgeom->SetGeom( dCreateTriMesh(pgeom->GetSpaceId(), odeData,0,0,0 ), true);
 
-    if (!pgeom->IsStatic())
-      dMassSetTrimeshTotal(&odeMass, mass.GetAsDouble(), pgeom->GetGeomId());
-  //}
+  if (!pgeom->IsStatic())
+    dMassSetTrimeshTotal(&odeMass, mass.GetAsDouble(), pgeom->GetGeomId());
 
   physics->ConvertMass(&mass, &odeMass);
   this->parent->SetMass(mass);

Modified: code/gazebo/trunk/server/physics/ode/ODETrimeshShape.hh
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODETrimeshShape.hh     2009-11-12 
04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/server/physics/ode/ODETrimeshShape.hh     2009-11-12 
15:28:37 UTC (rev 8394)
@@ -80,8 +80,6 @@
     /// \brief Load the trimesh
     protected: virtual void Load(XMLConfigNode *node);
 
-    //private: dTriMeshDataID odeData;
-
     private: dReal matrix_dblbuff[16*2];
     private: int last_matrix_index;
   };

Modified: code/gazebo/trunk/server/rendering/UserCamera.cc
===================================================================
--- code/gazebo/trunk/server/rendering/UserCamera.cc    2009-11-12 04:36:21 UTC 
(rev 8393)
+++ code/gazebo/trunk/server/rendering/UserCamera.cc    2009-11-12 15:28:37 UTC 
(rev 8394)
@@ -83,11 +83,11 @@
   this->InitCam();
 
   this->visual = new OgreVisual(this->pitchNode);
+
+  // The lines draw a visualization of the camera
   OgreDynamicLines *line = OgreCreator::Instance()->CreateDynamicLine(
       OgreDynamicRenderable::OT_LINE_LIST);
 
-  float d = 0.5;
-  float b = 0.01;
   float f = 0.2;
 
   // Create the front face

Modified: code/gazebo/trunk/worlds/map.world
===================================================================
--- code/gazebo/trunk/worlds/map.world  2009-11-12 04:36:21 UTC (rev 8393)
+++ code/gazebo/trunk/worlds/map.world  2009-11-12 15:28:37 UTC (rev 8394)
@@ -42,6 +42,7 @@
       <linearStart>10</linearStart>
       <linearEnd>100</linearEnd>
     </fog>
+    <grid>false</grid>
   </rendering:ogre>
 
    <!-- Ground Plane -->
@@ -55,13 +56,12 @@
         <normal>0 0 1</normal>
         <size>2000 2000</size>
         <segments>10 10</segments>
-        <uvTile>100 100</uvTile>
-        <material>Gazebo/Grey</material>
+        <uvTile>1000 1000</uvTile>
+        <material>Gazebo/GrayGrid</material>
       </geom:plane>
     </body:plane>
   </model:physical>
 
-
   <model:physical name="map">
     <static>true</static>
     <body:map name="map_body">
@@ -76,20 +76,6 @@
     </body:map>
   </model:physical>
 
-  <model:renderable name="directional_white">
-    <static>true</static>
-    <light>
-      <type>directional</type>
-      <direction>0 -0.6 -0.4</direction>
-      <diffuseColor>1.0 1.0 1.0</diffuseColor>
-      <specularColor>0.2 0.2 0.2</specularColor>
-      <range>100</range>
-
-      <!-- Constant(0-1) Linear(0-1) Quadratic -->
-      <attenuation>1.0 0.0 0</attenuation>
-    </light>
-  </model:renderable>
-
   <model:physical name="pioneer2dx_model1">
     <xyz>0 0 0.145</xyz>
     <rpy>0.0 0.0 0.0</rpy>
@@ -112,5 +98,21 @@
     </include>
   </model:physical>
 
+  <!-- White Point light -->
+  <model:renderable name="point_white">
+    <xyz>-4 4 5</xyz>
+    <static>true</static>
 
+    <light>
+      <type>point</type>
+      <diffuseColor>0.4 0.4 0.4</diffuseColor>
+      <specularColor>.1 .1 .1</specularColor>
+      <range>20</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.5 0.01 0.001</attenuation>
+    </light>
+  </model:renderable>
+ 
+
 </gazebo:world>


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to