mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-04 10:44:42 +00:00
Circle+Line: documentation
This commit is contained in:
@@ -15,19 +15,36 @@ namespace Ray {
|
||||
class Circle: public Drawable
|
||||
{
|
||||
public:
|
||||
Circle(Vector2 topLeftPos, int radius, Color);
|
||||
//! @brief Circle constructor
|
||||
//! @param topLeftPos position of top-left point (in percentage)
|
||||
//! @param radius radius of the circle(in percentage)
|
||||
//! @param Color Color of the circle
|
||||
Circle(Vector2 topLeftPos, int radius, Color color);
|
||||
|
||||
Circle(int topLeftX, int topLeftY, int radius, Color);
|
||||
//! @brief Circle constructor
|
||||
//! @param topLeftX x-position of top-left point (in percentage)
|
||||
//! @param topLeftY y-position of top-left point (in percentage)
|
||||
//! @param radius radius of the circle(in percentage)
|
||||
//! @param Color Color of the circle
|
||||
Circle(int topLeftX, int topLeftY, int radius, Color color);
|
||||
|
||||
//! @brief A default copy constructor
|
||||
Circle(const Circle &) = default;
|
||||
|
||||
//! @brief A circle is assignable
|
||||
Circle &operator=(const Circle &) = default;
|
||||
|
||||
//! @brief A default destructor
|
||||
~Circle() = default;
|
||||
|
||||
//! @return the radius of the circle
|
||||
int getRadius(void) const;
|
||||
|
||||
//! @brief set radius
|
||||
Circle &setRadius(int radius) const;
|
||||
|
||||
private:
|
||||
//! @brief Radius of the circle (in percentage)
|
||||
int _radius;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -15,21 +15,44 @@ namespace Ray {
|
||||
class Line: public Drawable
|
||||
{
|
||||
public:
|
||||
|
||||
//! @brief Line constructor
|
||||
//! @param position position of top-left point (in percentage)
|
||||
//! @param length length of the line(in percentage)
|
||||
//! @param rotation Color of the line (in degrees)
|
||||
Line(Vector2 position, int length, Color);
|
||||
|
||||
//! @brief Line constructor
|
||||
//! @param x x-position of top-left point (in percentage)
|
||||
//! @param y y-position of top-left point (in percentage)
|
||||
//! @param length length of the line(in percentage)
|
||||
//! @param rotation Color of the line (in degrees)
|
||||
Line(int x, int y, int length, Color);
|
||||
|
||||
//! @brief A default copy constructor
|
||||
Line(const Line &) = default;
|
||||
|
||||
//! @brief A line is assignable
|
||||
Line &operator=(const Line &) = default;
|
||||
|
||||
//! @brief A default destructor
|
||||
~Line() = default;
|
||||
|
||||
//! @return the length of the line
|
||||
int getLength(void) const;
|
||||
|
||||
//! @return the rotation of the line
|
||||
int getRotation(void) const;
|
||||
|
||||
//! @brief set length
|
||||
Line &setLength(int);
|
||||
|
||||
//! @brief set rotation
|
||||
Line &setRotation(int);
|
||||
private:
|
||||
//! @brief Length of the line (in percentage)
|
||||
int _length;
|
||||
//! @brief Rotation of the line (from origin, in degree)
|
||||
int _rotation;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user