mirror of
https://github.com/love2d/love.git
synced 2026-08-17 02:58:31 +02:00
making a stab at updating Shapes
--HG-- branch : box2d-update
This commit is contained in:
@@ -41,15 +41,6 @@ namespace box2d
|
||||
**/
|
||||
class CircleShape : public Shape
|
||||
{
|
||||
private:
|
||||
|
||||
// The radius of the circle. We need to store this because
|
||||
// Box2D has no built-in method for getting the radius.
|
||||
float radius;
|
||||
|
||||
// Local offset.
|
||||
b2Vec2 localPosition;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
@@ -58,7 +49,7 @@ namespace box2d
|
||||
* @param body The parent body.
|
||||
* @param def The CircleShape definition.
|
||||
**/
|
||||
CircleShape(Body * body, b2CircleDef * def);
|
||||
CircleShape(b2CircleShape * c);
|
||||
|
||||
virtual ~CircleShape();
|
||||
|
||||
@@ -66,11 +57,11 @@ namespace box2d
|
||||
* Gets the radius for the circle.
|
||||
**/
|
||||
float getRadius() const;
|
||||
|
||||
// There is no support for setting the radius.
|
||||
|
||||
void getLocalCenter(float & x, float & y) const;
|
||||
void getWorldCenter(float & x, float & y) const;
|
||||
|
||||
/**
|
||||
* Gets the radius for the circle.
|
||||
**/
|
||||
void setRadius(float r);
|
||||
};
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user