0

我用vs2019写了一个简单的连续碰撞例子,但是总不能编译。错误信息:</p>

C2259   'fcl::InterpMotion<S>': cannot instantiate abstract class   
C2259   'fcl::ScrewMotion<S>': cannot instantiate abstract class
    auto g1 = std::make_shared<fcl::Boxf>(1, 2, 3);
    auto t1 = fcl::Transform3f::Identity();
    auto o1 = new fcl::CollisionObjectf(g1, t1);
    auto t1_final = fcl::Transform3f::Identity();
    t1_final.translation() = fcl::Vector3f(1, 0, 0);

    auto g2 = std::make_shared<fcl::Conef>(1, 3);
    auto t2 = fcl::Transform3f::Identity();
    auto o2 = new fcl::CollisionObjectf(g2, t2);
    auto t2_final = fcl::Transform3f::Identity();
    t2_final.translation() = fcl::Vector3f(-1, 0, 0);

    fcl::ContinuousCollisionRequestf request;
    fcl::ContinuousCollisionResultf result;
    std::cout << fcl::continuousCollide(o1, t1_final, o2, t2_final, request, result);

    delete o1;
    delete o2;

'fcl::InterpMotion': 无法实例化抽象类

4

1 回答 1

0

fcl/math/motion/interp_motion.h fcl/math/motion/interp_motion-inl.h fcl/math/motion/screw_motion.h fcl/math/motion/screw_motion-inl.h 我不得不更改doubleS.

template <typename S>
bool InterpMotion<S>::integrate(double dt) const

template <typename S>
bool InterpMotion<S>::integrate(S dt) const
于 2021-05-25T07:46:12.647 回答