Commit 1998c652 authored by t steve's avatar t steve
Browse files

no longer considers shared ptr but pointers to fcl objects

parent 28e4555e
......@@ -70,7 +70,7 @@ namespace hpp {
};
// helper function to extract mesh model of an fcl::collisionObstacle
BVHModelOBConst_Ptr_t GetModel (const fcl::CollisionObjectConstPtr_t& object);
BVHModelOBConst_Ptr_t GetModel (FclConstCollisionObjectPtr_t object);
/// \addtogroup affordance
/// \{
......@@ -91,14 +91,14 @@ namespace hpp {
/// \param colObj reference to pointer to fcl::collisionObject
/// containing the found affordance objects.
Affordance (const std::vector<unsigned int>& idxVec,
const fcl::CollisionObjectPtr_t& colObj):
FclConstCollisionObjectPtr_t colObj):
indices_(idxVec), colObj_(colObj) {}
/// Triangle indices that correspond to the triangles of the reference
/// collisionObstacle, and form the affordance object.
std::vector<unsigned int> indices_;
/// Reference to the collisionObstacle the surfaces of which are used to
/// create the affordance object.
fcl::CollisionObjectPtr_t colObj_;
FclConstCollisionObjectPtr_t colObj_;
};
/// Class containing a vector of vectors of Affordance objects.
/// The length of the outer vector corresponds to the amount of different
......@@ -163,7 +163,7 @@ namespace hpp {
/// \param opVec vector of operation objects that determine which requirements
/// are set for which affordance type. The length of this vector
/// corresponds to the amount of different affordance types considered.
SemanticsDataPtr_t affordanceAnalysis (const fcl::CollisionObjectPtr_t& colObj,
SemanticsDataPtr_t affordanceAnalysis (FclConstCollisionObjectPtr_t colObj,
const OperationBases_t & opVec);
/// Free function that, given a semanticsData pointer, creates one
......
......@@ -49,6 +49,9 @@ namespace hpp {
typedef boost::shared_ptr <SemanticsData> SemanticsDataPtr_t;
typedef boost::shared_ptr <Affordance> AffordancePtr_t;
typedef boost::shared_ptr <AffordanceExtraction> AffordanceExtractionPtr_t;
typedef fcl::CollisionObject FclCollisionObject;
typedef fcl::CollisionObject * FclCollisionObjectPtr_t;
typedef const fcl::CollisionObject * FclConstCollisionObjectPtr_t;
} // namespace affordance
} // namespace hpp
......
......@@ -27,7 +27,7 @@
namespace hpp {
namespace affordance {
BVHModelOBConst_Ptr_t GetModel (const fcl::CollisionObjectConstPtr_t& object)
BVHModelOBConst_Ptr_t GetModel (FclConstCollisionObjectPtr_t object)
{
assert (object->collisionGeometry ()->getNodeType () == fcl::BV_OBBRSS);
const BVHModelOBConst_Ptr_t model = boost::static_pointer_cast<const BVHModelOB>
......@@ -78,7 +78,7 @@ namespace hpp {
}
}
SemanticsDataPtr_t affordanceAnalysis (const fcl::CollisionObjectPtr_t& colObj,
SemanticsDataPtr_t affordanceAnalysis (FclConstCollisionObjectPtr_t colObj,
const OperationBases_t& opVec)
{
BVHModelOBConst_Ptr_t model = GetModel (colObj);
......
......@@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE (one_triangle1)
model->addSubModel (vertices, triangles);
model->endModel ();
boost::shared_ptr <fcl::CollisionObject> obj (new fcl::CollisionObject(model, pose));
fcl::CollisionObject* obj (new fcl::CollisionObject(model, pose));
hpp::affordance::SemanticsDataPtr_t h = hpp::affordance::affordanceAnalysis (obj, operations);
......
......@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (one_triangle2)
model->addSubModel (vertices, triangles);
model->endModel ();
boost::shared_ptr <fcl::CollisionObject> obj (new fcl::CollisionObject(model, pose));
fcl::CollisionObject* obj (new fcl::CollisionObject(model, pose));
hpp::affordance::SemanticsDataPtr_t h = hpp::affordance::affordanceAnalysis (obj, operations);
......
......@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (oriented_triangles1)
model->addSubModel (vertices, triangles);
model->endModel ();
boost::shared_ptr <fcl::CollisionObject> obj (new fcl::CollisionObject(model, pose));
fcl::CollisionObject* obj (new fcl::CollisionObject(model, pose));
hpp::affordance::SemanticsDataPtr_t h = hpp::affordance::affordanceAnalysis (obj, operations);
......
......@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (oriented_triangles2)
model->addSubModel (vertices, triangles);
model->endModel ();
boost::shared_ptr <fcl::CollisionObject> obj (new fcl::CollisionObject(model, pose));
fcl::CollisionObject* obj (new fcl::CollisionObject(model, pose));
hpp::affordance::SemanticsDataPtr_t h = hpp::affordance::affordanceAnalysis (obj, operations);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment