diff --git a/include/hpp/fcl/math/transform.h b/include/hpp/fcl/math/transform.h index e26c1a775c77132d670d067ddb1b44f3859dfd55..3eba2726914fdbf5f5fc20d1b9fb7cf90377ab9b 100644 --- a/include/hpp/fcl/math/transform.h +++ b/include/hpp/fcl/math/transform.h @@ -409,7 +409,7 @@ public: { matrix_set = false; q.conj(); - T = q.transform(-T); + T = q.transform(-T).eval(); return *this; } @@ -424,7 +424,7 @@ public: inline const Transform3f& operator *= (const Transform3f& other) { matrix_set = false; - T = q.transform(other.T) + T; + T += q.transform(other.T).eval(); q *= other.q; return *this; } diff --git a/include/hpp/fcl/shape/geometric_shape_to_BVH_model.h b/include/hpp/fcl/shape/geometric_shape_to_BVH_model.h index 9e97491fd20247a6edcde42e9b781b1fde8f689c..2784abdc793d8060dfdb770755a2d567dafd4c3f 100644 --- a/include/hpp/fcl/shape/geometric_shape_to_BVH_model.h +++ b/include/hpp/fcl/shape/geometric_shape_to_BVH_model.h @@ -79,7 +79,7 @@ void generateBVHModel(BVHModel<BV>& model, const Box& shape, const Transform3f& for(unsigned int i = 0; i < points.size(); ++i) { - points[i] = pose.transform(points[i]); + points[i] = pose.transform(points[i]).eval(); } model.beginModel(); diff --git a/src/traversal/traversal_node_bvhs.cpp b/src/traversal/traversal_node_bvhs.cpp index 5682606c403d0049063ec12259a344ba0d064474..06b1405226a4bcdf2e1401974663c262363a6eb1 100644 --- a/src/traversal/traversal_node_bvhs.cpp +++ b/src/traversal/traversal_node_bvhs.cpp @@ -354,8 +354,8 @@ static inline void distancePostprocessOrientedNode(const BVHModel<BV>* model1, c /// the points obtained by triDistance are not in world space: both are in object1's local coordinate system, so we need to convert them into the world space. if(request.enable_nearest_points && (result.o1 == model1) && (result.o2 == model2)) { - result.nearest_points[0] = tf1.transform(result.nearest_points[0]); - result.nearest_points[1] = tf1.transform(result.nearest_points[1]); + result.nearest_points[0] = tf1.transform(result.nearest_points[0]).eval(); + result.nearest_points[1] = tf1.transform(result.nearest_points[1]).eval(); } } @@ -492,7 +492,7 @@ bool meshConservativeAdvancementOrientedNodeCanStop(FCL_REAL c, Vec3f n_transformed (getBVAxes(model1->getBV(c1).bv) * n); Quaternion3f R0; motion1->getCurrentRotation(R0); - n_transformed = R0.transform(n_transformed); + n_transformed = R0.transform(n_transformed).eval(); n_transformed.normalize(); TBVMotionBoundVisitor<BV> mb_visitor1(model1->getBV(c1).bv, n_transformed), mb_visitor2(model2->getBV(c2).bv, -n_transformed);