Revision: 8793
http://playerstage.svn.sourceforge.net/playerstage/?rev=8793&view=rev
Author: hsujohnhsu
Date: 2010-06-25 01:09:22 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
implemented GetGeom() enabling contact sensor
Modified Paths:
--------------
code/gazebo/trunk/server/sensors/contact/ContactSensor.cc
code/gazebo/trunk/server/sensors/contact/ContactSensor.hh
Modified: code/gazebo/trunk/server/sensors/contact/ContactSensor.cc
===================================================================
--- code/gazebo/trunk/server/sensors/contact/ContactSensor.cc 2010-06-25
01:08:44 UTC (rev 8792)
+++ code/gazebo/trunk/server/sensors/contact/ContactSensor.cc 2010-06-25
01:09:22 UTC (rev 8793)
@@ -153,3 +153,13 @@
return Contact();
}
+
+//////////////////////////////////////////////////////////////////////////////
+/// Get a contact for a geom by index
+Geom* ContactSensor::GetGeom(unsigned int geom) const
+{
+ if (geom < this->geoms.size())
+ return this->geoms[geom];
+
+ return NULL;
+}
Modified: code/gazebo/trunk/server/sensors/contact/ContactSensor.hh
===================================================================
--- code/gazebo/trunk/server/sensors/contact/ContactSensor.hh 2010-06-25
01:08:44 UTC (rev 8792)
+++ code/gazebo/trunk/server/sensors/contact/ContactSensor.hh 2010-06-25
01:09:22 UTC (rev 8793)
@@ -81,7 +81,7 @@
public: unsigned int GetGeomCount() const;
/// \brief Get a geom
- public: Geom *GetGeom(unsigned int index);
+ public: Geom *GetGeom(unsigned int index) const;
/// \brief Return the number of contacts for an observed geom
public: unsigned int GetGeomContactCount(unsigned int geomIndex) const;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit