Clarify sf::ConvexShape docs

Co-authored-by: Jan Haller <bromeon@gmail.com>
This commit is contained in:
Chris Thrasher 2022-06-08 10:43:21 -06:00 committed by Lukas Dürrenberger
parent 6a59ab0051
commit 9e23fb0899

View File

@ -54,7 +54,8 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the number of points of the polygon /// \brief Set the number of points of the polygon
/// ///
/// \a count must be greater than 2 to define a valid shape. /// For the shape to be rendered as expected, \a count must
/// be greater or equal to 3.
/// ///
/// \param count New number of points of the polygon /// \param count New number of points of the polygon
/// ///
@ -76,11 +77,14 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the position of a point /// \brief Set the position of a point
/// ///
/// Don't forget that the polygon must remain convex, and /// Don't forget that the shape must be convex and the
/// the points need to stay ordered! /// order of points matters. Points should not overlap.
/// setPointCount must be called first in order to set the total /// This applies to rendering; it is explicitly allowed
/// number of points. The result is undefined if \a index is out /// to temporarily have non-convex or degenerate shapes
/// of the valid range. /// when not drawn (e.g. during shape initialization).
///
/// Point count must be specified beforehand. The behavior is
/// undefined if \a index is greater than or equal to getPointCount.
/// ///
/// \param index Index of the point to change, in range [0 .. getPointCount() - 1] /// \param index Index of the point to change, in range [0 .. getPointCount() - 1]
/// \param point New position of the point /// \param point New position of the point