diff --git a/trunk/fcl/include/fcl/collision_object.h b/trunk/fcl/include/fcl/collision_object.h index 9996a4c73eb20415739c0fba75fb27ea13e0f993..dabaf4d4bc4f5ade612a8643397897d79dcdb484 100644 --- a/trunk/fcl/include/fcl/collision_object.h +++ b/trunk/fcl/include/fcl/collision_object.h @@ -217,113 +217,6 @@ protected: void *user_data; }; - - - -/** \brief Base class for all objects participating in collision */ -class CollisionObject2 -{ -public: - virtual ~CollisionObject2() {} - - virtual OBJECT_TYPE getObjectType() const { return OT_UNKNOWN; } - - virtual NODE_TYPE getNodeType() const { return BV_UNKNOWN; } - - virtual void computeLocalAABB() = 0; - - inline const AABB& getAABB() const - { - return aabb; - } - - inline void computeAABB() - { - Vec3f center = t.transform(aabb_center); - Vec3f delta(aabb_radius, aabb_radius, aabb_radius); - aabb.min_ = center - delta; - aabb.max_ = center + delta; - } - - void* getUserData() const - { - return user_data; - } - - void setUserData(void *data) - { - user_data = data; - } - - inline const Vec3f& getTranslation() const - { - return t.getTranslation(); - } - - inline const Matrix3f& getRotation() const - { - return t.getRotation(); - } - - inline const SimpleQuaternion& getQuatRotation() const - { - return t.getQuatRotation(); - } - - void setRotation(const Matrix3f& R) - { - t.setRotation(R); - } - - void setTranslation(const Vec3f& T) - { - t.setTranslation(T); - } - - void setQuatRotation(const SimpleQuaternion& q) - { - t.setQuatRotation(q); - } - - void setTransform(const Matrix3f& R, const Vec3f& T) - { - t.setTransform(R, T); - } - - void setTransform(const SimpleQuaternion& q, const Vec3f& T) - { - t.setTransform(q, T); - } - - bool isIdentityTransform() const - { - return t.isIdentity(); - } - - void setIdentityTransform() - { - t.setIdentity(); - } - -protected: - - /** AABB in global coordinate */ - mutable AABB aabb; - - /** AABB center in local coordinate */ - Vec3f aabb_center; - - /** AABB radius */ - BVH_REAL aabb_radius; - - SimpleTransform t; - - /** pointer to user defined data specific to this object */ - void *user_data; - -}; - - } #endif