24 lines
459 B
C
24 lines
459 B
C
|
#include "point.h"
|
||
|
class Circle
|
||
|
{
|
||
|
private:
|
||
|
Point mCenter;
|
||
|
float mRadius;
|
||
|
|
||
|
public:
|
||
|
Circle(const Point& acenter, float aradius);
|
||
|
Circle();
|
||
|
Circle(const Circle& circle);
|
||
|
Point getCenter() const;
|
||
|
float getRadius() const;
|
||
|
|
||
|
void setCenter(const Point& p);
|
||
|
void setRadius(float radius);
|
||
|
float getArea() const;
|
||
|
float getDistance(const Point& p);
|
||
|
bool isColliding(const Circle& c) const;
|
||
|
void move(const Point& p);
|
||
|
};
|
||
|
|
||
|
|