Or directly public. At least, I have a use case in mind: My thor::ConcaveShape class should be able to create a copy of any sf::Shape, and this is not possible without accessing the single points. On the other side, I see that the single points can be an implementation detail, especially for circles. Hm...
Apart from that, I think it is a little bit confusing that there exists GetPoint() and GetOutlinePoint(), although they do the same (analogous for the count getter). Remember that you can also loosen access in derived classes, i.e. redeclare the method in the public section.
At first it was exactly like this:
- GetPointsCount and GetPoint
- some classes just made them public
But I figured out that some classes may define public points that don't match the internal ones. For example, the number of points defined by sf::StarShape is the number of "branches". It must be multiplied by two to get the actual number of points composing the shape.
So I had to write this less elegant solution. However, if someone can find a synonym to "point" for the star shape (I spent hours on it, couldn't find anything
), it can probably solve the problem as well, and I could revert to the first, more elegant solution. Then, making GetPoint and GetPointsCount public in the base class would be a good option
I've seen another one: "offseted" instead of "offset"
I never know how to write this one in past tenses. Is this an irregular verb?