Revision: 8976
http://playerstage.svn.sourceforge.net/playerstage/?rev=8976&view=rev
Author: natepak
Date: 2010-11-24 03:27:30 +0000 (Wed, 24 Nov 2010)
Log Message:
-----------
Fixed some bugs
Modified Paths:
--------------
code/gazebo/branches/dev/server/physics/Body.cc
code/gazebo/branches/dev/server/physics/Geom.cc
code/gazebo/branches/dev/server/physics/PhysicsEngine.cc
code/gazebo/branches/dev/server/rendering/Visual.cc
code/gazebo/branches/dev/server/rendering/Visual.hh
Modified: code/gazebo/branches/dev/server/physics/Body.cc
===================================================================
--- code/gazebo/branches/dev/server/physics/Body.cc 2010-11-23 04:23:57 UTC
(rev 8975)
+++ code/gazebo/branches/dev/server/physics/Body.cc 2010-11-24 03:27:30 UTC
(rev 8976)
@@ -379,9 +379,9 @@
if (this->cgVisual == NULL)
{
- this->cgVisual = new Visual(this->comEntity->GetVisualNode());
+ this->cgVisual = new Visual(this->comEntity);
this->cgVisual->SetName(visname.str());
- this->cvVisual->Init();
+ this->cgVisual->Init();
}
else
this->cgVisual->DetachObjects();
Modified: code/gazebo/branches/dev/server/physics/Geom.cc
===================================================================
--- code/gazebo/branches/dev/server/physics/Geom.cc 2010-11-23 04:23:57 UTC
(rev 8975)
+++ code/gazebo/branches/dev/server/physics/Geom.cc 2010-11-24 03:27:30 UTC
(rev 8976)
@@ -171,7 +171,7 @@
visname << this->GetCompleteScopedName() << "_VISUAL_" <<
this->visuals.size();
Visual *visual = new Visual(this->visualNode);
visual->Load(childNode);
- visual->SetName(visname);
+ visual->SetName(visname.str());
visual->SetIgnorePoseUpdates(true);
visual->SetOwner(this);
visual->Init();
Modified: code/gazebo/branches/dev/server/physics/PhysicsEngine.cc
===================================================================
--- code/gazebo/branches/dev/server/physics/PhysicsEngine.cc 2010-11-23
04:23:57 UTC (rev 8975)
+++ code/gazebo/branches/dev/server/physics/PhysicsEngine.cc 2010-11-24
03:27:30 UTC (rev 8976)
@@ -59,8 +59,8 @@
if (Simulator::Instance()->GetRenderEngineEnabled())
{
- this->visual = new Visual(NULL);
- this->visual->SetName("Physics_Engine_Visual"), this->world->GetScene());
+ this->visual = new Visual(NULL); //this->world->GetScene();
+ this->visual->SetName("Physics_Engine_Visual");
this->visual->SetVisible(false);
this->visual->SetCastShadows(false);
this->visual->SetUseRTShader(false);
@@ -116,7 +116,7 @@
if (this->visual)
{
- OgreCreator::Instance()->DeleteVisual( this->visual );
+ delete this->visual;
this->visual = NULL;
}
Modified: code/gazebo/branches/dev/server/rendering/Visual.cc
===================================================================
--- code/gazebo/branches/dev/server/rendering/Visual.cc 2010-11-23 04:23:57 UTC
(rev 8975)
+++ code/gazebo/branches/dev/server/rendering/Visual.cc 2010-11-24 03:27:30 UTC
(rev 8976)
@@ -47,12 +47,9 @@
SelectionObj *Visual::selectionObj = 0;
unsigned int Visual::visualCounter = 0;
- FIXING OGRE VISUAL!!
-
-
////////////////////////////////////////////////////////////////////////////////
// Constructor
-Visual::Visual(Common *parent)//const std::string &name, Scene *scene, Visual
*node)
+Visual::Visual(Common *parent)
: Common(parent)
{
this->AddType(VISUAL);
@@ -328,7 +325,19 @@
(*iter)->Update();
}
+////////////////////////////////////////////////////////////////////////////////
+/// Set the owner
+void Visual::SetOwner(Common *common)
+{
+ this->owner = common;
+}
+////////////////////////////////////////////////////////////////////////////////
+// Get the owner
+Common *Visual::GetOwner() const
+{
+ return this->owner;
+}
////////////////////////////////////////////////////////////////////////////////
// Save the visual in XML format
Modified: code/gazebo/branches/dev/server/rendering/Visual.hh
===================================================================
--- code/gazebo/branches/dev/server/rendering/Visual.hh 2010-11-23 04:23:57 UTC
(rev 8975)
+++ code/gazebo/branches/dev/server/rendering/Visual.hh 2010-11-24 03:27:30 UTC
(rev 8976)
@@ -55,23 +55,26 @@
class Visual : public Common, public Ogre::Any
{
/// \brief Constructor
- public: Visual (const std::string &name, Scene *scene, Visual
*parent=NULL, Entity *owner = NULL);
+ public: Visual (Common *parent = NULL);
- /// \brief Constructor
- public: Visual (Ogre::SceneNode *node, bool isStatic=false);
+ /// \brief Destructor
+ public: virtual ~Visual();
/// \brief Helper for the contructor
- private: void ConstructorHelper(Ogre::SceneNode *node, bool
isStatic=false);
+ public: void Init();
- /// \brief Destructor
- public: virtual ~Visual();
-
/// \brief Load the visual
public: void Load(XMLConfigNode *node);
/// \brief Update the visual.
public: void Update();
+ /// \brief Set the owner
+ public: void SetOwner(Common *common);
+
+ /// \brief Get the owner
+ public: Common *GetOwner() const;
+
/// \brief Attach a manipulation visual
public: void AttachManipulation();
@@ -160,9 +163,6 @@
/// \brief Make the visual objects static renderables
public: void MakeStatic();
- /// \brief Get the entity that manages this visual
- public: Entity *GetOwner() const;
-
/// \brief Set to true to show a white bounding box, used to indicate
// user selection
public: void ShowSelectionBox( bool value );
@@ -235,7 +235,7 @@
private: static unsigned int visualCounter;
- private: Entity *owner;
+ private: Common *owner;
private: ParamT<Vector3> *xyzP;
private: ParamT<Quatern> *rpyP;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit