I think all drawable and transformable things could have the same parent class.
For example:
namespace sf
{
class Object
: sf::Drawable, sf::Transformable
{
};
// and all drawable and transformable classes derives it
// for exmaple:
class Sprite
: sf::Object
{
//...
};
I came up with this idea when i written SFML and Box2d framework, when I needed to write method returning drawable object which i can set it position.
And how i can draw it?
win.draw(*((Drawable*)transformablePtr));
???
This is a very bad code, because i don't know whether transformablePtr is Drawable.