A circle. More...
#include <shape_2d.hpp>


Public Member Functions | |
| Circle (Vector2D const ¢er, double radius) | |
| Class constructor. More... | |
| bool | operator() (const Vector2D &r) const |
| Returns true is a point is inside the shape, false otherwise. More... | |
| const Vector2D & | getCenter (void) const |
| Returns the center of the circle. More... | |
| double | getRadius (void) const |
| Returns the radius of the circle. More... | |
| void | setCenter (Vector2D const ¢er) |
| Sets a new center to the circle. More... | |
| Circle (const Circle &origin) | |
| Copy constructor. More... | |
Public Member Functions inherited from Shape2D | |
| virtual | ~Shape2D (void) |
| virtual destructor | |
A circle.
Definition at line 27 of file shape_2d.hpp.
| Circle::Circle | ( | Vector2D const & | center, |
| double | radius | ||
| ) |
Class constructor.
| center | Position of the center |
| radius | Radius |
Definition at line 6 of file shape_2d.cpp.
| Circle::Circle | ( | const Circle & | origin | ) |
| const Vector2D & Circle::getCenter | ( | void | ) | const |
Returns the center of the circle.
Definition at line 11 of file shape_2d.cpp.

| double Circle::getRadius | ( | void | ) | const |
Returns the radius of the circle.
Definition at line 16 of file shape_2d.cpp.

|
virtual |
Returns true is a point is inside the shape, false otherwise.
| r | Point in 2d space |
Implements Shape2D.
Definition at line 26 of file shape_2d.cpp.

| void Circle::setCenter | ( | Vector2D const & | center | ) |
Sets a new center to the circle.
| center | The center of the circle |
Definition at line 21 of file shape_2d.cpp.

1.8.13