ofxBox2d alternatives and similar libraries
Based on the "Physics" category.
Alternatively, view ofxBox2d alternatives based on common mentions on social networks and blogs.
Bullet9.4 5.2 L1 ofxBox2d VS BulletBullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
Box2D8.8 0.0 L2 ofxBox2d VS Box2DBox2D is a 2D physics engine for games
LiquidFun8.3 0.0 L1 ofxBox2d VS LiquidFun2D physics engine for games
NVIDIA PhysX SDK7.8 0.0 ofxBox2d VS NVIDIA PhysX SDKNVIDIA PhysX SDK
Simbody7.3 1.3 L1 ofxBox2d VS SimbodyHigh-performance C++ multibody dynamics/physics library for simulating articulated biomechanical and mechanical systems like vehicles, robots, and the human skeleton.
CHRONO6.9 9.9 L1 ofxBox2d VS CHRONOHigh-performance C++ library for multiphysics and multibody dynamics simulations
Chipmunk6.9 0.0 L4 ofxBox2d VS ChipmunkA fast and lightweight 2D game physics library.
Newton Dynamics5.5 9.9 L1 ofxBox2d VS Newton DynamicsNewton Dynamics is an integrated solution for real time simulation of physics environments.
ODE2.8 0.3 L2 ofxBox2d VS ODEOpen Dynamics Engine
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ofxBox2d or a related project?
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
First, pick the branch that matches your version of openFrameworks:
- OF stable (0.9.8): use ofxBox2d/stable
- OF master (0.10.0): use ofxBox2d/master
When making a vector of objects you need to be careful. You either need to make a vector of pointers of use the
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 <ofxBox2dCircle> circles; ofxBox2dCircle circle; circles.push_back(circle);
Here is the how to create a vector of box2d objects.
// in your header files vector <shared_ptr<ofxBox2dCircle> > circles; // now add a circle to the vector auto circle = std::make_shared<ofxBox2dCircle>(); // to grab the pointer you use the get() function of shared_ptr (std::shared_ptr) circle->setPhysics(3.0, 0.53, 0.1); circle->setup(box2d.getWorld(), 100, 100, 10); circles.push_back(circle);
Place ofxBox2d within a folder in the apps folder of the OF dir tree: openframeworks/addons/ofxBox2d
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.git cd ofxBox2d git checkout 008