ODE仿真引擎使用
Posted zhaochenliang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ODE仿真引擎使用相关的知识,希望对你有一定的参考价值。
新建C++空项目
1、ode相关头文件加入工程文件中
属性->配置属性->C/C++ ->常规->附加包含目录 :
D:ODEode-0.16include |
2、引入 ode 依赖的库文件 ode_doubled.lib, drawstuffd.lib
属性->配置属性->链接器->输入->附加依赖项:
D:ODEode-0.16libDebugDoubleDLLode_doubled.lib |
3、加入预编译定义 dDOUBLE
属性->配置属性->C/C++ ->预处理器->预处理器定义->
_MT |
4、资源文件设置
对应的dll文件复制到C/windows/sys32 or sysWOW64
Drawstuffd.dll
ode_doubled.dll
#include "texturepath.h"
头文件里面对应的位置F:/ODE/drawstuff/textures
A typical simulation will proceed like this:
- Create a dynamics world.
- Create bodies in the dynamics world.
- Set the state (position etc) of all bodies.
- Create joints in the dynamics world.
- Attach the joints to the bodies.
- Set the parameters of all joints.
- Create a collision world and collision geometry objects, as necessary.
- Create a joint group to hold the contact joints.
- Loop:
- • Apply forces to the bodies as necessary.
- • Adjust the joint parameters as necessary.
- • Call collision detection.
- • Create a contact joint for every collision point, and put it in the contact joint group.
- • Take a simulation step.
- • Remove all joints in the contact joint group.
- Destroy the dynamics and collision worlds.
以上是关于ODE仿真引擎使用的主要内容,如果未能解决你的问题,请参考以下文章