Question: mesh and box collision check?
Hi,
I'm trying to check if there is a collision between a mesh model and a Box of volume 1 located at specific point,
The problem I'm facing is that when the Box is located inside the mesh, the collision function returns false (no collision).
How can I use fcl to check if there is a collision inside the mesh??
Here is the code used for the collision check: //loading the mesh.obj std::vector<Vec3f> p1; std::vector<Triangle> t1; loadOBJFile("mesh.obj", p1, t1); BVHModel<OBBRSS>* m1 = new BVHModel<OBBRSS>();
m1->beginModel(); m1->addSubModel(p1, t1); m1->endModel();
Transform3f tf1; tf1.setIdentity(); tf1.setTranslation(Vec3f(0,0,0)); CollisionObject* obj = new CollisionObject(boost::shared_ptr<CollisionGeometry>(m1), tf1);
//creating the Box centered at specific point
boost::shared_ptr<Box> Sample(new Box(1));
tf0.setIdentity();
tf0.setTranslation(Vec3f(0 , 0 , -5));
CollisionObject co0(Sample, tf0);
static const int num_max_contacts = std::numeric_limits
The model used is as shown below
The following is a snap shot of Box and mesh collision ( the mesh is represented as points just for visualization but the model used is as shown in the previous snap shot)
I have the same problem, did you find a solution?
@Randa-Almadhoun @michaelaeriksen Hello, I mentioned a question in this kind of type, I am using BVHModel, how do I get so triangle mesh, it currently results just a boundary. https://github.com/coal-library/coal/issues/706#issue-3072792041 Looking forward to your reply!