http://sfml-dev.org/tutorials/2.1/graphics-transform.php#object-hierarchies-scene-graphI'm probably missing something here, but the Node in the example is an abstract class, but owns a private m_transform member variable with no transformations. This Transform is passed into the onRender function of the derived class, but the SpriteNode does nothing with it. So the only way I can see the m_transform member variable as useful is if the Node had a protected method that returned it so SpriteNode could use it for its own transformation, or if SpriteNode had its own Transform member variable and it was combined with the m_transform passed through. What am I not understanding from the example?
My high level understanding is that this pattern is meant for a scene graph where one transformation can be "relative" to a parent transformation. Is that right?
Also, I've seen this in C++ a few different times, but I can't find documentation on combining pointers:
sf::Transform combinedTransform = parentTransform * m_transform;
states.transform *= getTransform();
Are these overloaded operators that know internally how to resolve a "combination", or is there another term for this where I can read more?
Thanks!
Brian