Jiaoma / chipmunk-physics

Automatically exported from code.google.com/p/chipmunk-physics
MIT License
0 stars 0 forks source link

[PATCH] Box shape interface homogeneisation #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

This patch apply to the current cvs checkout.

When i add a static box shape to the static body of the space, it is located at 
the origin.

This patch allow to place a static box shape anywhere in the space.

Beside that i add a cpAreaForBox macro just for code homogeneity (you can 
ignore this if you think it's a bit weird).

Original issue reported on code.google.com by paul.cha...@gmail.com on 17 Jun 2011 at 6:51

GoogleCodeExporter commented 8 years ago
Here is an update with the possibility to turn the box.

As a rationale, i provide a test.c file that show how i use chipmunk and why i 
need those patches.

Original comment by paul.cha...@gmail.com on 18 Jun 2011 at 8:05

Attachments:

GoogleCodeExporter commented 8 years ago
I tried to bypass the space's static body so i have created a body for each of 
my static shapes.

But when i call cpBodySetPos its reactivate the body.

Why only cpBodySetMass, cpBodySetMoment and cpBodySetAngle aren't automatically 
defined and don't force the body activation ?

Original comment by paul.cha...@gmail.com on 18 Jun 2011 at 3:41