28 return ScalarProd(r-center_,r-center_)<pow(radius_,2);
34 Circle::~Circle(
void) {}
37 center_(origin.getCenter()), radius_(origin.getRadius()) {}
bool operator()(const Vector2D &r) const
Returns true is a point is inside the shape, false otherwise.
void setCenter(Vector2D const ¢er)
Sets a new center to the circle.
Outside(Shape2D const &shape)
Class constructor.
double ScalarProd(Vector3D const &v1, Vector3D const &v2)
Scalar product of two vectors.
double getRadius(void) const
Returns the radius of the circle.
bool operator()(const Vector2D &r) const
Returns true is a point is inside the shape, false otherwise.
virtual ~Shape2D(void)
virtual destructor
Abstract type for a two dimensional shape.
Circle(Vector2D const ¢er, double radius)
Class constructor.
const Vector2D & getCenter(void) const
Returns the center of the circle.