Revision: 7656
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7656&view=rev
Author:   natepak
Date:     2009-05-14 04:32:05 +0000 (Thu, 14 May 2009)

Log Message:
-----------
More changes to the cmake files

Modified Paths:
--------------
    code/gazebo/trunk/server/CMakeLists.txt
    code/gazebo/trunk/server/physics/Body.cc
    code/gazebo/trunk/server/physics/Body.hh
    code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
    code/gazebo/trunk/server/physics/ode/ODEPhysics.hh

Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt     2009-05-14 03:14:25 UTC (rev 
7655)
+++ code/gazebo/trunk/server/CMakeLists.txt     2009-05-14 04:32:05 UTC (rev 
7656)
@@ -61,7 +61,6 @@
              GazeboError.cc
              GazeboMessage.cc
              Model.cc
-             Simulator.cc
              Angle.cc
              Param.cc
              GraphicsIfaceHandler.cc
@@ -75,7 +74,6 @@
              Model.hh
              Pose3d.hh
              Quatern.hh
-             Simulator.hh
              SingletonT.hh
              StaticPluginRegister.hh
              Time.hh
@@ -95,7 +93,7 @@
 
 ADD_LIBRARY(gazebo_server SHARED ${gazeboserver_sources})
 
-ADD_EXECUTABLE(gazebo-exec main.cc)
+ADD_EXECUTABLE(gazebo-exec Simulator.cc main.cc)
 SET_TARGET_PROPERTIES(gazebo-exec PROPERTIES OUTPUT_NAME "gazebo")
 
 LIST_TO_STRING(GAZEBO_CFLAGS "${gazeboserver_cflags}")

Modified: code/gazebo/trunk/server/physics/Body.cc
===================================================================
--- code/gazebo/trunk/server/physics/Body.cc    2009-05-14 03:14:25 UTC (rev 
7655)
+++ code/gazebo/trunk/server/physics/Body.cc    2009-05-14 04:32:05 UTC (rev 
7656)
@@ -62,15 +62,17 @@
 
 
////////////////////////////////////////////////////////////////////////////////
 // Constructor
-Body::Body(Entity *parent, dWorldID worldId)
+Body::Body(Entity *parent)
     : Entity(parent)
 {
   this->physicsEngine = World::Instance()->GetPhysicsEngine();
 
   if ( !this->IsStatic() )
   {
-    this->bodyId = dBodyCreate(worldId);
+    ODEPhysics *odePhysics = (ODEPhysics*)(this->physicsEngine);
 
+    this->bodyId = dBodyCreate(odePhysics->GetWorldId());
+
     dMassSetZero( &this->mass );
   }
   else
@@ -164,7 +166,7 @@
   {
     //std::cout << "setting self collide: " << this->nameP->GetValue() << 
std::endl;
     ODEPhysics* pe = 
dynamic_cast<ODEPhysics*>(World::Instance()->GetPhysicsEngine());
-    this->spaceId = dSimpleSpaceCreate( pe->spaceId);
+    this->spaceId = dSimpleSpaceCreate( pe->GetSpaceId());
   }
 
   // option to enter full mass matrix

Modified: code/gazebo/trunk/server/physics/Body.hh
===================================================================
--- code/gazebo/trunk/server/physics/Body.hh    2009-05-14 03:14:25 UTC (rev 
7655)
+++ code/gazebo/trunk/server/physics/Body.hh    2009-05-14 04:32:05 UTC (rev 
7656)
@@ -51,7 +51,7 @@
   class Body : public Entity
   {
     /// \brief Constructor
-    public: Body(Entity *parent, dWorldID worldId);
+    public: Body(Entity *parent);
 
     /// \brief Destructor
     public: virtual ~Body();

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2009-05-14 03:14:25 UTC 
(rev 7655)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.cc  2009-05-14 04:32:05 UTC 
(rev 7656)
@@ -255,10 +255,17 @@
 // Create a new body
 Body *ODEPhysics::CreateBody(Entity *parent)
 {
-  return new Body(parent, this->worldId);
+  return new Body(parent);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
+// Get the world id
+dWorldID ODEPhysics::GetWorldId()
+{
+  return this->worldId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
 // Create a new joint
 Joint *ODEPhysics::CreateJoint(Joint::Type type)
 {

Modified: code/gazebo/trunk/server/physics/ode/ODEPhysics.hh
===================================================================
--- code/gazebo/trunk/server/physics/ode/ODEPhysics.hh  2009-05-14 03:14:25 UTC 
(rev 7655)
+++ code/gazebo/trunk/server/physics/ode/ODEPhysics.hh  2009-05-14 04:32:05 UTC 
(rev 7656)
@@ -125,6 +125,9 @@
   /// \brief Return the space id 
   public: dSpaceID GetSpaceId() const;
 
+  /// \brief Get the world id
+  public: dWorldID GetWorldId();
+
   /// \brief Do collision detection
   private: static void CollisionCallback( void *data, dGeomID o1, dGeomID o2);
 
@@ -132,7 +135,7 @@
   private: dWorldID worldId;
 
   /// \brief Top-level space for all sub-spaces/geoms
-  public: dSpaceID spaceId;
+  private: dSpaceID spaceId;
 
   /// \brief Collision attributes
   private: dJointGroupID contactGroup;


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

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to