42 #define BOOST_TEST_MODULE BROADPHASE_DYNAMIC_AABB_TREE 43 #include <boost/test/included/unit_test.hpp> 66 return distance_callback(o1, o2, &
data, dist);
73 const std::vector<CollisionObject*>& objects = *(data->
objects);
74 const bool object0_first = a == objects[0];
104 const Eigen::Vector3d position0(0.1, 0.2, 0.3);
105 const Eigen::Vector3d position1(0.11, 0.21, 0.31);
118 std::vector<CollisionObject*> objects;
119 objects.push_back(&object0);
120 objects.push_back(&object1);
122 std::vector<Eigen::Vector3d> positions;
123 positions.push_back(position0);
124 positions.push_back(position1);
127 for (
size_t i = 0; i < objects.size(); ++i) {
128 objects[i]->setTranslation(positions[i]);
129 objects[i]->computeAABB();
139 for (
int count = 0; count < 8; ++count) {
void distance(CollisionObject *obj, DistanceCallBackBase *callback) const
perform distance computation between one object and all the objects belonging to the manager ...
BOOST_AUTO_TEST_CASE(DynamicAABBTreeCollisionManager_class)
std::vector< CollisionObject * > * objects
bool distance_callback(CollisionObject *a, CollisionObject *, void *callback_data, FCL_REAL &)
bool distance(CollisionObject *o1, CollisionObject *o2, FCL_REAL &dist)
Distance evaluation between two objects in collision. This callback will cause the broadphase evaluat...
virtual void update()
update the condition of manager
void registerObject(CollisionObject *obj)
add one object to the manager
bool expect_object0_then_object1
shared_ptr< CollisionGeometry > CollisionGeometryPtr_t
the object for collision or distance computation, contains the geometry and the transform information...
Base callback class for distance queries. This class can be supersed by child classes to provide desi...