GCC Code Coverage Report


Directory: ./
File: include/pinocchio/collision/fcl-pinocchio-conversions.hpp
Date: 2024-08-27 18:20:05
Exec Total Coverage
Lines: 3 3 100.0%
Branches: 4 8 50.0%

Line Branch Exec Source
1 //
2 // Copyright (c) 2015-2024 CNRS INRIA
3 //
4
5 #ifndef __pinocchio_collision_fcl_convertion_hpp__
6 #define __pinocchio_collision_fcl_convertion_hpp__
7
8 #include <hpp/fcl/math/transform.h>
9 #include "pinocchio/spatial/se3.hpp"
10
11 namespace pinocchio
12 {
13 template<typename Scalar>
14 142 inline hpp::fcl::Transform3f toFclTransform3f(const SE3Tpl<Scalar> & m)
15 {
16
1/2
✓ Branch 1 taken 142 times.
✗ Branch 2 not taken.
142 SE3Tpl<double, 0> m_ = m.template cast<double>();
17
3/6
✓ Branch 1 taken 142 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 142 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 142 times.
✗ Branch 8 not taken.
284 return hpp::fcl::Transform3f(m_.rotation(), m_.translation());
18 }
19
20 inline SE3 toPinocchioSE3(const hpp::fcl::Transform3f & tf)
21 {
22 typedef SE3::Scalar Scalar;
23 return SE3(tf.getRotation().cast<Scalar>(), tf.getTranslation().cast<Scalar>());
24 }
25
26 } // namespace pinocchio
27
28 #endif // ifndef __pinocchio_collision_fcl_convertion_hpp__
29