From 9b2e6c6df4f1a44f41d362e6a343e1794b4a3f8d Mon Sep 17 00:00:00 2001
From: isucan <isucan@253336fb-580f-4252-a368-f3cef5a2a82b>
Date: Fri, 6 Jan 2012 14:20:31 +0000
Subject: [PATCH] add user data for CollisionGeometry

git-svn-id: https://kforge.ros.org/fcl/fcl_ros@57 253336fb-580f-4252-a368-f3cef5a2a82b
---
 trunk/fcl/include/fcl/collision_object.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/trunk/fcl/include/fcl/collision_object.h b/trunk/fcl/include/fcl/collision_object.h
index dabaf4d4..77f603bd 100644
--- a/trunk/fcl/include/fcl/collision_object.h
+++ b/trunk/fcl/include/fcl/collision_object.h
@@ -61,11 +61,24 @@ public:
 
   virtual void computeLocalAABB() = 0;
 
+  void* getUserData() const
+  {
+    return user_data;
+  }
+
+  void setUserData(void *data)
+  {
+    user_data = data;
+  }
+
   /** AABB center in local coordinate */
   Vec3f aabb_center;
 
   /** AABB radius */
   BVH_REAL aabb_radius;
+
+  /** pointer to user defined data specific to this object */
+  void *user_data;
 };
 
 class CollisionObject
-- 
GitLab