Box2D Get/Set in b2ShapeDef and b2PolygonDef
BlitzMax Forums/Brucey's Modules/Box2D Get/Set in b2ShapeDef and b2PolygonDef
| ||
Hi Bruce :) I'm keeping references to every ShapeDef and BodyDef object in order to modify or reset box2d bodies in my level Editor. Unfortunately b2ShapeDef miss every getter methods to retrieve original information. And I think that b2PolygonDef miss the GetVertices() method too. I know some of the getter method exist in b2shape but not all of them (density for example, which is probably modified by Box2d). I would love to see these in a next update :) Thanks ! |
| ||
I've added those missing def Get methods. I know some of the getter method exist in b2shape but not all of them All of the public methods are currently exposed. The other data that you mention is protected, so I don't have access to it (I guess neither should you! ;-) |
| ||
Yes indeed. I was just using shape.getFriction() or something, but I prefer stick to the shapeDef to reuse original data. Thanks :) |