一,osgworks
1, 代码下载
GitHub - mccdo/osgworks: A toolkit for OpenSceneGraph applications
2,cmake 配置
2,错误修改
在报错的文件/osgwTools/GeometryModifier.cpp中添加头文件#include <osg/Group>
将mgv.mergeGeode(geode);修改为mgv.mergeGroup(*geode.asGroup());
二,bulllet3
1,下源码
2,cmake 配置
三,osgbullet
1,下载源码
https://github.com/mccdo/osgbullet.git
2,cmake 配置
osg路径,osgworks 路径,bullet路径
3,错误修改
TriangleFunctor(293): error C2660: “osgbCollision::ComputeTriMeshFunc::operator ()”: 函数不接受 3 个参数
解决:在所有报错的this->operator()开头的语句末尾增加一个参数false
例如:
this->operator()(*(vptr),*(vptr+1),*(vptr+2));
改为:this->operator()(*(vptr),*(vptr+1),*(vptr+2),false);
四,碰撞列子
参考:VS2017 64位 osg+osgworks+bullet3+osgbullet编译教程(超详细、附生成的库(文末尾自取))_老王敲代码的博客-CSDN博客_bullet3 编译
https://blog.csdn.net/weixin_42962516/article/details/111357015