osg::UserDataContainer only accepts osg::Object, so four payloads that are
pure game data inherited from it purely to get in the door: TextKeyMapHolder,
MWRender::PtrHolder, RefnumMarker and RefnumSet. SceneUtil::UserData<T> takes
that base on once so the payloads do not have to, which lets TextKeyMapHolder,
PtrHolder and RefnumSet disappear entirely in favour of TextKeyMap, MWWorld::Ptr
and std::vector<ESM::RefNum>, and leaves RefnumMarker a plain aggregate. The
five hand-rolled dynamic_cast scans over the container collapse into findUserData
and forEachUserData, which also drops the positional getUserObject(0) assumption
in getPagedRefnums in favour of a lookup by type.
Deleting the wrapper missed that it had a second job: being a type serialize.cpp could ignore by name, which a bare osg::Object parked in a user data container cannot be singled out for. Without it a scene dump hoists the entire template subtree into the user-data block and demotes the node's real children to bare UniqueID back-references, and no blunt filter can fix that because the same containers carry shaderPrefix, recordIndex and fileHash value objects that the dump should keep. TemplateMultiRef stays gone, the eight call sites still share one addTemplateRef helper that ignores a null template, and holding a ref_ptr<const osg::Object> means no call site needs a const_cast any more.
Both were osg::Object subclasses whose only job was to hold a ref_ptr to another Object so it could be parked in a UserDataContainer. Since UserDataContainer already keeps a ref to any object handed to it, the wrapper is dead weight; add the referenced object directly with addUserObject instead. Nothing reads the wrappers back (no dynamic_cast hits on either type), so pure keep-alive semantics are preserved and no visitor logic changes; serializer ignore-list entries for the two class names are dropped alongside.
This PR removes dummy serialisers for `StateSetUpdater`, `NodeCallback` and the respective `META` macros that trigger serialisation requirement here.
`StateSetUpdater` and `NodeCallback` are just base classes that can not be used on their own, so there is no need to incorporate them into serialisation. These changes might have minor effects on derived classes that forget to override `className()`, `libraryName()` through `META`, but it makes hardly a difference to now serialise such classes as a dysfunctional `osg::Callback` instead of a dysfunctional `SceneUtil::NodeCallback`.
Properly apply transformations to both switch and LOD nodes
Allow both NiSwitchNode and NiLODNode to be the root node
Properly add CollisionSwitch into the scene graph
Double buffering, custom bounding box and the update in the cull visitor (instead of update) are now all handled internally rather than needing hacks and/or callbacks.
The double buffering is an implementation detail so it should be handled as such, rather than mandating the scene graph to be structured in a certain way.
Override accept(NodeVisitor&) instead of using callbacks.