/LGC物理引擎/Box2D:一个 2D rigid body 物理引擎
来源:互联网 发布:对网络语言暴力的看法 编辑:程序博客网 时间:2024/06/06 09:33
Box2D:一个 2D rigid body 物理引擎
作者: 刘鹏
日期: 2009-03-09
Box2D 是一个2D rigid body 物理引擎,本文介绍了它的基本情况、主要特色以及使用 Box2D 开发程序的基本思路。
Overview
Box2D 是一个功能丰富的 2D rigid body 物理引擎,基于 C++ 开发,作者是 Erin Catto。使用 Box2D,开发人员可以使对象运动时具有物理效果,如惯性、自由落体、碰撞等等。
2D rigid body 是一个不会变形的物体,它具有质量和惯性。它的状态由重心和旋转角度决定。它的动态移动由线速度和角速度控制。3
Box2D 已在多个游戏中使用,包括 Crayon Physics Deluxe,该游戏赢得了 2008 Independent Game Festival Grand Prize。
Box2D 已经移植到 Flash、Java、C#、Python、JavaScript、D 和具有定点数运算能力的嵌入式设备上。
Features1
- Collision
- Continuous collision detection.
- Contact callbacks: add, persist, remove.
- Convex polyons and circles.
- Multiple shapes per body
- One-shot contact manifolds
- Incremental sweep-and-prune broadphase
- Efficient pair management
- Fast broadphase AABB queries
- Collision groups and categories
- Physics
- Continuous physics with time of impact island solver.
- Persistent body-joint-contact graph
- Island solution and sleep management
- Contact, friction, and restitution
- Stable stacking with a linear-time solver
- Revolute, prismatic, distance, pulley, gear, and mouse joints
- Joint limits, motors, and friction
- Momentum decoupled position correction
- Fairly accurate reaction forces/impulses
- System
- Small block and stack allocators
- Centralized tuning parameters
- Highly portable C++ with no use of STL containers
Box2D 开发基本思路
- create a world
- create a Ground Box
- Create a Dynamic Body
- Simulating the World
- time step is 60Hz 或者 1/60 秒
- integrator,在离散时间点模拟物理方程
- simulation loop : call b2World::Step.
细节内容可以参考 box2d manual 中的 helloworld 例子,http://www.box2d.org/manual.html#d0e110 。
Reference
1. Box2D Features
2. box2d wiki
3. Rigid Body
4. box2d manual
- /LGC物理引擎/Box2D:一个 2D rigid body 物理引擎
- /LGC物理引擎/Android port of Box2d
- /LGC物理引擎/javascript 版的 Box2D
- Android 2d物理引擎Box2d介绍
- /LGC物理引擎/Ubuntu 下编译运行 Box2D
- box2d物理引擎学习
- Box2D物理引擎介绍
- Box2d,物理引擎
- box2D 物理引擎例子
- Box2d 物理引擎
- 物理引擎Box2D 入门
- Box2d,物理引擎
- Box2D物理引擎
- cocos Box2D物理引擎
- Box2D物理引擎入门
- Android 2d物理引擎Box2d的使用示例
- Android 2d物理引擎Box2d的使用示例
- Android 2D物理引擎Box2d的使用示例
- C#调用GoogleEarth COM API开发(一)
- 常用的 SQL Server 数据库命令
- eth0:Error while etting interface flags:No such device
- Linux下的鼠标操作
- RTEMS文件系统(2):系统初始化
- /LGC物理引擎/Box2D:一个 2D rigid body 物理引擎
- /LGC物理引擎/Havok physics engine 分析
- 人生感悟:巧妙说服他人的心理术
- /LGC物理引擎/overview of Physics Engine
- ASP.NET中批量删除--只调用一次存储过程
- Oracle binary_float和binary_double
- /LGC动画引擎
- PHP程序员应该掌握的10项技能!
- CAN通讯电路设计