Skip to content

Commit

Permalink
Improved documentation for sf::Shape and derived classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Apr 19, 2014
1 parent 19012c6 commit e9243b7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
11 changes: 7 additions & 4 deletions include/SFML/Graphics/CircleShape.hpp
Expand Up @@ -82,23 +82,26 @@ public :
void setPointCount(unsigned int count);

////////////////////////////////////////////////////////////
/// \brief Get the number of points of the shape
/// \brief Get the number of points of the circle
///
/// \return Number of points of the shape
/// \return Number of points of the circle
///
/// \see setPointCount
///
////////////////////////////////////////////////////////////
virtual unsigned int getPointCount() const;

////////////////////////////////////////////////////////////
/// \brief Get a point of the shape
/// \brief Get a point of the circle
///
/// The returned point is in local coordinates, that is,
/// the shape's transforms (position, rotation, scale) are
/// not taken into account.
/// The result is undefined if \a index is out of the valid range.
///
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
///
/// \return Index-th point of the shape
/// \return index-th point of the shape
///
////////////////////////////////////////////////////////////
virtual Vector2f getPoint(unsigned int index) const;
Expand Down
3 changes: 3 additions & 0 deletions include/SFML/Graphics/ConvexShape.hpp
Expand Up @@ -93,6 +93,9 @@ public :
////////////////////////////////////////////////////////////
/// \brief Get the position of a point
///
/// The returned point is in local coordinates, that is,
/// the shape's transforms (position, rotation, scale) are
/// not taken into account.
/// The result is undefined if \a index is out of the valid range.
///
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
Expand Down
12 changes: 8 additions & 4 deletions include/SFML/Graphics/RectangleShape.hpp
Expand Up @@ -73,19 +73,23 @@ public :
////////////////////////////////////////////////////////////
/// \brief Get the number of points defining the shape
///
/// \return Number of points of the shape
/// \return Number of points of the shape. For rectangle
/// shapes, this number is always 4.
///
////////////////////////////////////////////////////////////
virtual unsigned int getPointCount() const;

////////////////////////////////////////////////////////////
/// \brief Get a point of the shape
/// \brief Get a point of the rectangle
///
/// The returned point is in local coordinates, that is,
/// the shape's transforms (position, rotation, scale) are
/// not taken into account.
/// The result is undefined if \a index is out of the valid range.
///
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
/// \param index Index of the point to get, in range [0 .. 3]
///
/// \return Index-th point of the shape
/// \return index-th point of the shape
///
////////////////////////////////////////////////////////////
virtual Vector2f getPoint(unsigned int index) const;
Expand Down
5 changes: 4 additions & 1 deletion include/SFML/Graphics/Shape.hpp
Expand Up @@ -198,11 +198,14 @@ public :
////////////////////////////////////////////////////////////
/// \brief Get a point of the shape
///
/// The returned point is in local coordinates, that is,
/// the shape's transforms (position, rotation, scale) are
/// not taken into account.
/// The result is undefined if \a index is out of the valid range.
///
/// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
///
/// \return Index-th point of the shape
/// \return index-th point of the shape
///
/// \see getPointCount
///
Expand Down

0 comments on commit e9243b7

Please sign in to comment.