Skip to content

Commit

Permalink
compatibility with hpp-fcl <> 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 7, 2024
1 parent 5942160 commit bb47b80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/affordance.impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,19 @@ hpp::doubleSeqSeqSeqSeq* Afford::getAffordancePoints(char const* affordance) {
tris.length((CORBA::ULong)nbTris);
for (std::size_t triIdx = 0; triIdx < nbTris; triIdx++) {
hpp::doubleSeqSeq triangle;
#if HPP_FCL_VERSION_AT_LEAST(3, 0, 0)
const fcl::Triangle& refTri = (*model->tri_indices)[triIdx];
#else
const fcl::Triangle& refTri = model->tri_indices[triIdx];
#endif
triangle.length(3);
for (unsigned int vertIdx = 0; vertIdx < 3; vertIdx++) {
fcl::Vec3f p(affObjs[affIdx].second->fcl()->getRotation() *
#if HPP_FCL_VERSION_AT_LEAST(3, 0, 0)
(*model->vertices)[refTri[vertIdx]] +
#else
model->vertices[refTri[vertIdx]] +
#endif
affObjs[affIdx].second->fcl()->getTranslation());
hpp::doubleSeq point;
// point always 3D
Expand Down

0 comments on commit bb47b80

Please sign in to comment.