Added constructors with parameters for shapes, and default-constructed shapes are now always empty
This commit is contained in:
parent
6034b80ddf
commit
44cc9bad84
8 changed files with 35 additions and 34 deletions
|
@ -44,16 +44,14 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
///
|
||||
/// Creates a circle with a radius of 10.
|
||||
/// \param radius Radius of the circle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CircleShape();
|
||||
CircleShape(float radius = 0);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the radius of the circle
|
||||
///
|
||||
/// The default radius of a circle is 10.
|
||||
///
|
||||
/// \param radius New radius of the circle
|
||||
///
|
||||
/// \see GetRadius
|
||||
|
|
|
@ -45,16 +45,12 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
///
|
||||
/// Creates a default triangle, just so that it's not empty.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
ConvexShape();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the number of points of the polygon
|
||||
///
|
||||
/// The default number of points of a polygon is 6.
|
||||
///
|
||||
/// \param count New number of points of the polygon
|
||||
///
|
||||
/// \see GetPointsCount
|
||||
|
|
|
@ -44,16 +44,14 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
///
|
||||
/// Creates a 10x10 rectangle.
|
||||
/// \param size Size of the rectangle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
RectangleShape();
|
||||
RectangleShape(const Vector2f& size = Vector2f(0, 0));
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the size of the rectangle
|
||||
///
|
||||
/// The default size of a rectangle is 10x10.
|
||||
///
|
||||
/// \param size New size of the rectangle
|
||||
///
|
||||
/// \see GetSize
|
||||
|
|
|
@ -44,16 +44,21 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
///
|
||||
/// Creates a star with 5 points, an inner radius of 10 and
|
||||
/// an outer radius of 20.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
StarShape();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the inner radius of the star
|
||||
/// \brief Constructor
|
||||
///
|
||||
/// The default inner radius of a star is 10.
|
||||
/// \param innerRadius Inner radius of the star
|
||||
/// \param outerRadius Outer radius of the star
|
||||
/// \param pointsCount Number of points of the star
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
StarShape(float innerRadius, float outerRadius, unsigned int pointsCount);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the inner radius of the star
|
||||
///
|
||||
/// \param radius New inner radius of the star
|
||||
///
|
||||
|
@ -75,8 +80,6 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the outer radius of the star
|
||||
///
|
||||
/// The default outer radius of a star is 20.
|
||||
///
|
||||
/// \param radius New outer radius of the star
|
||||
///
|
||||
/// \see GetOuterRadius
|
||||
|
@ -97,8 +100,6 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the number of points of the star
|
||||
///
|
||||
/// The default number of points of a star is 5.
|
||||
///
|
||||
/// \param count New number of points of the star
|
||||
///
|
||||
/// \see GetPointsCount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue