洞察如何利用第三方app跳转到微信小程序提升企业运营效率
1018
2022-10-19
ofxBox2d:Box2D开源框架包装器
ofxBox2d
Introduction
This is a simple wrapper for box2d using Openframeworks. The examples below are still in progressive, but should be stable for the most part. Please open up a issue if you have suggestions or find bugs. The wrapper is using the version Box2D v2.3
Thanks, Todd
Installation
First, pick the branch that matches your version of openFrameworks:
OF stable (0.9.8): use ofxBox2d/stableOF master (0.10.0): use ofxBox2d/master
Instructions
When making a vector of objects you need to be careful. You either need to make a vector of pointers of use the shared_ptr object.
Everytime you push into the vector circles the object is destroyed and the created. This causing issues for the b2dBody body object owned by box2d.
Incorrect way to store objects.
vector
Here is the how to create a vector of box2d objects.
// in your header filesvector
Installation
Place ofxBox2d within a folder in the apps folder of the OF dir tree:
openframeworks/addons/ofxBox2d
Compatibility
ofxBox2d is developed against the current version of OpenFramewroks.
If you are using a stable version (007, 0071, ...) of OpenFrameworks then you want to use a git tag of ofxBox2d for that version. You can select the tag in the Github "Current Branch" menu or clone and check it out using git.
For example, the following commands will clone ofxBox2d and switch to the OF 008 tagged version:
git clone git://github.com/vanderlin/ofxBox2d.gitcd ofxBox2dgit checkout 008
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~