Revision: 7463
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7463&view=rev
Author:   natepak
Date:     2009-03-12 03:18:46 +0000 (Thu, 12 Mar 2009)

Log Message:
-----------
Temporary changes

Modified Paths:
--------------
    code/branches/federation/gazebo/server/rendering/OgreVisualManager.cc

Modified: code/branches/federation/gazebo/server/rendering/OgreVisualManager.cc
===================================================================
--- code/branches/federation/gazebo/server/rendering/OgreVisualManager.cc       
2009-03-11 20:22:49 UTC (rev 7462)
+++ code/branches/federation/gazebo/server/rendering/OgreVisualManager.cc       
2009-03-12 03:18:46 UTC (rev 7463)
@@ -25,6 +25,7 @@
  */
 
 #include "Model.hh"
+#include "Geom.hh"
 #include "GazeboError.hh"
 #include "GazeboMessage.hh"
 #include "Entity.hh"
@@ -93,24 +94,25 @@
 /// Update all the visuals
 void OgreVisualManager::Update()
 {
-  /*std::map<std::string, OgreVisual*>::iterator iter;
+  std::map<std::string, OgreVisual*>::iterator iter;
   OgreVisual *vis = NULL;
   Entity *owner = NULL;
   Pose3d pose;
 
-  printf("----------------------\n");
+  //printf("----------------------\n");
   for (iter = this->visuals.begin(); iter != this->visuals.end(); iter++)
   {
     vis = iter->second;
     owner = vis->GetOwner();
-    Model *model = dynamic_cast<Model*>(owner);
+    if (!owner)
+      continue;
 
-    if (owner)
-    {
-      //std::cout << "Vis[" << owner->GetName() << "] Pose[" << 
owner->GetPoseRelative() << "]\n";
-      //vis->SetPose(owner->GetPoseRelative());
-    }
+    Geom *geom = dynamic_cast<Geom*>(owner);
+
+    if (geom || !owner->GetParent())
+      vis->SetPose(owner->GetPose());
+    else
+      vis->SetPose(owner->GetPose() - owner->GetParent()->GetPose());
   }
-  */
 }
  


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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to