首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在FCL中使用fcl::continuousCollide来报告错误?

为什么在FCL中使用fcl::continuousCollide来报告错误?
EN

Stack Overflow用户
提问于 2021-05-24 22:26:27
回答 1查看 14关注 0票数 0

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

代码语言:javascript
复制
C2259   'fcl::InterpMotion<S>': cannot instantiate abstract class   
C2259   'fcl::ScrewMotion<S>': cannot instantiate abstract class
代码语言:javascript
复制
    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;

EN

回答 1

Stack Overflow用户

发布于 2021-05-25 15:46:13

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中,我必须将double更改为S

代码语言:javascript
复制
template <typename S>
bool InterpMotion<S>::integrate(double dt) const

template <typename S>
bool InterpMotion<S>::integrate(S dt) const
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67673789

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档