Skip to content
Snippets Groups Projects
Commit 0ccee846 authored by jpan's avatar jpan
Browse files

git-svn-id: https://kforge.ros.org/fcl/fcl_ros@56 253336fb-580f-4252-a368-f3cef5a2a82b
parent cd66479c
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment