Hi!
I've created a new C++ wrapper for Chipmunk 6. The old one wasn't using a namespace, depended on boost::shared_ptr and was tested only with Chipmunk 4.
http://github.com/jhasse/chipmunkpp/
It's not finished yet, but I will improve it in the next weeks. Please tell me what you think of it and if you have any suggestion for the design, code style, etc.
Chipmunk C++ Wrapper
-
- Posts: 6
- Joined: Tue Mar 06, 2012 11:02 am
- Contact:
Chipmunk C++ Wrapper
Last edited by jhasse on Sat Sep 29, 2012 9:27 pm, edited 2 times in total.
-
- Posts: 6
- Joined: Tue Mar 06, 2012 11:02 am
- Contact:
Re: Chipmunk C++ Wrapper
I've created a small homepage using github: http://jhasse.github.com/chipmunkpp/
@slembcke
Could you add my wrapper to http://chipmunk-physics.net/bindingsAndPorts.php ?
Btw: The bindings and ports link at http://chipmunk-physics.net/release/Chi ... test-Docs/ is broken
@slembcke
Could you add my wrapper to http://chipmunk-physics.net/bindingsAndPorts.php ?
Btw: The bindings and ports link at http://chipmunk-physics.net/release/Chi ... test-Docs/ is broken
Last edited by jhasse on Sat Sep 29, 2012 9:27 pm, edited 1 time in total.
-
- Posts: 145
- Joined: Tue Mar 04, 2008 2:21 am
- Contact:
Re: Chipmunk C++ Wrapper
Hello jhase,
Can you tell us which Chipmunk version and the completenes of the wrapper?
Can you tell us which Chipmunk version and the completenes of the wrapper?
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
-
- Posts: 6
- Joined: Tue Mar 06, 2012 11:02 am
- Contact:
Re: Chipmunk C++ Wrapper
Hi,aisman wrote:Hello jhase,
Can you tell us which Chipmunk version and the completenes of the wrapper?
It's using the latest version (6.1.1) and it isn't complete yet (maybe 20%?). I'm already using it in my project, but I only use a small amount of Chipmunk atm (e.g. no joints, etc.). Sorry
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Chipmunk C++ Wrapper
Updated!
I've been pondering about making an official Chipmunk C++ wrapper for a while now. (I just rarely program in C++) I have a ruby script in Git called "extract_protos.rb" that I use for pulling all the function data for working on the docs sometimes. It should make it pretty easy to generate a set of C++ bindings from a script. The C/C++ API would be almost entirely a 1:1 correspondence anyway. I'm not quite sure exactly how long that would take though.
Anyway. It's much appreciated that you are filling this need until/if I have time to make a more complete solution. Thanks!
I've been pondering about making an official Chipmunk C++ wrapper for a while now. (I just rarely program in C++) I have a ruby script in Git called "extract_protos.rb" that I use for pulling all the function data for working on the docs sometimes. It should make it pretty easy to generate a set of C++ bindings from a script. The C/C++ API would be almost entirely a 1:1 correspondence anyway. I'm not quite sure exactly how long that would take though.
Anyway. It's much appreciated that you are filling this need until/if I have time to make a more complete solution. Thanks!
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 6
- Joined: Tue Mar 06, 2012 11:02 am
- Contact:
Re: Chipmunk C++ Wrapper
Thanks!slembcke wrote:Updated!
Unfortunately it isn't that easy, especially if you're trying to make a modern and nice wrapper. For example the cpSpaceSegmentQuery function I've implemented today in Chipmunk++ is quite different than a simple wrapper in order to allow passing lambdas:I've been pondering about making an official Chipmunk C++ wrapper for a while now. (I just rarely program in C++) I have a ruby script in Git called "extract_protos.rb" that I use for pulling all the function data for working on the docs sometimes. It should make it pretty easy to generate a set of C++ bindings from a script. The C/C++ API would be almost entirely a 1:1 correspondence anyway. I'm not quite sure exactly how long that would take though.
Code: Select all
space.segmentQuery(a, b, ALL_LAYERS, NO_GROUP, [&](std::shared_ptr<Shape> shape, Float, Vect) {
// do something with shape
});
Who is online
Users browsing this forum: No registered users and 2 guests