#ifndef SOPHUS_INTERPOLATE_DETAILS_HPP #define SOPHUS_INTERPOLATE_DETAILS_HPP #include "rxso2.hpp" #include "rxso3.hpp" #include "se2.hpp" #include "se3.hpp" #include "sim2.hpp" #include "sim3.hpp" #include "so2.hpp" #include "so3.hpp" namespace Sophus { namespace interp_details { template struct Traits; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(SO2 const& foo_T_bar) { using std::abs; Scalar angle = foo_T_bar.log(); return abs(abs(angle) - Constants::pi()) < Constants::epsilon(); } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(RxSO2 const& foo_T_bar) { return Traits>::hasShortestPathAmbiguity(foo_T_bar.so2()); } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(SO3 const& foo_T_bar) { using std::abs; Scalar angle = foo_T_bar.logAndTheta().theta; return abs(abs(angle) - Constants::pi()) < Constants::epsilon(); } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(RxSO3 const& foo_T_bar) { return Traits>::hasShortestPathAmbiguity(foo_T_bar.so3()); } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(SE2 const& foo_T_bar) { return Traits>::hasShortestPathAmbiguity(foo_T_bar.so2()); } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(SE3 const& foo_T_bar) { return Traits>::hasShortestPathAmbiguity(foo_T_bar.so3()); } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(Sim2 const& foo_T_bar) { return Traits>::hasShortestPathAmbiguity( foo_T_bar.rxso2().so2()); ; } }; template struct Traits> { static bool constexpr supported = true; static bool hasShortestPathAmbiguity(Sim3 const& foo_T_bar) { return Traits>::hasShortestPathAmbiguity( foo_T_bar.rxso3().so3()); ; } }; } // namespace interp_details } // namespace Sophus #endif // SOPHUS_INTERPOLATE_DETAILS_HPP