Return 30 // fixed, but could be an attribute of the class if needed Virtual unsigned int getPointCount() const Void setRadius(const sf::Vector2f& radius) Here is a complete example of a custom shape class: EllipseShape.Įxplicit EllipseShape(const sf::Vector2f& radius = sf::Vector2f(0, 0)) : You must also call the update() protected function whenever any point in your shape changes, so that the base class is informed and can update
0 Comments
Leave a Reply. |