Renamed GetOutlinePoint/GetOutlinePointsCount to GetPoint/GetPointsCount in sf::Shape, and made them public
This commit is contained in:
parent
e6956d8e4d
commit
048abbf46f
8 changed files with 35 additions and 80 deletions
|
@ -69,15 +69,13 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
float GetRadius() const;
|
||||
|
||||
private :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of points defining the shape
|
||||
/// \brief Get the number of points of the shape
|
||||
///
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int GetOutlinePointsCount() const;
|
||||
virtual unsigned int GetPointsCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the shape
|
||||
|
@ -87,7 +85,7 @@ private :
|
|||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f GetOutlinePoint(unsigned int index) const;
|
||||
virtual Vector2f GetPoint(unsigned int index) const;
|
||||
|
||||
private :
|
||||
|
||||
|
@ -122,6 +120,6 @@ private :
|
|||
/// window.Draw(circle);
|
||||
/// \endcode
|
||||
///
|
||||
/// \see sf::Shape, sf::StarShape, sf::RectangleShape, sf::ConvexShape
|
||||
/// \see sf::Shape, sf::RectangleShape, sf::ConvexShape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -68,7 +68,7 @@ public :
|
|||
/// \see SetPointsCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int GetPointsCount() const;
|
||||
virtual unsigned int GetPointsCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a point
|
||||
|
@ -94,27 +94,7 @@ public :
|
|||
/// \see SetPoint
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
Vector2f GetPoint(unsigned int index) const;
|
||||
|
||||
private :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of points defining the shape
|
||||
///
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int GetOutlinePointsCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the shape
|
||||
///
|
||||
/// \param index Index of the point to get
|
||||
///
|
||||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f GetOutlinePoint(unsigned int index) const;
|
||||
virtual Vector2f GetPoint(unsigned int index) const;
|
||||
|
||||
private :
|
||||
|
||||
|
@ -157,6 +137,6 @@ private :
|
|||
/// window.Draw(polygon);
|
||||
/// \endcode
|
||||
///
|
||||
/// \see sf::Shape, sf::StarShape, sf::RectangleShape, sf::CircleShape
|
||||
/// \see sf::Shape, sf::RectangleShape, sf::CircleShape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -69,15 +69,13 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
const Vector2f& GetSize() const;
|
||||
|
||||
private :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of points defining the shape
|
||||
///
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int GetOutlinePointsCount() const;
|
||||
virtual unsigned int GetPointsCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the shape
|
||||
|
@ -87,7 +85,7 @@ private :
|
|||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f GetOutlinePoint(unsigned int index) const;
|
||||
virtual Vector2f GetPoint(unsigned int index) const;
|
||||
|
||||
private :
|
||||
|
||||
|
@ -122,6 +120,6 @@ private :
|
|||
/// window.Draw(rectangle);
|
||||
/// \endcode
|
||||
///
|
||||
/// \see sf::Shape, sf::StarShape, sf::CircleShape, sf::ConvexShape
|
||||
/// \see sf::Shape, sf::CircleShape, sf::ConvexShape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -184,6 +184,24 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
float GetOutlineThickness() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total number of points of the shape
|
||||
///
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int GetPointsCount() const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the shape
|
||||
///
|
||||
/// \param index Index of the point to get, in range [0 .. GetPointsCount() - 1]
|
||||
///
|
||||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f GetPoint(unsigned int index) const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of the entity
|
||||
///
|
||||
|
@ -230,30 +248,6 @@ protected :
|
|||
////////////////////////////////////////////////////////////
|
||||
void Update();
|
||||
|
||||
private :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of points defining the shape
|
||||
///
|
||||
/// This function must be implemented in derived classes.
|
||||
///
|
||||
/// \return Number of points of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int GetOutlinePointsCount() const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the shape
|
||||
///
|
||||
/// This function must be implemented in derived classes.
|
||||
///
|
||||
/// \param index Index of the point to get
|
||||
///
|
||||
/// \return Index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f GetOutlinePoint(unsigned int index) const = 0;
|
||||
|
||||
private :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue