I propose a functionnality which -I think- can be very useful : adding a pointer to a user data (logically a void*) so that if you want to link an IScenenode to a class you have created you just have to pass a pointer and don't have to recompile the engine.
For example : you have a class Entity which contains an IScenenode (this class does not derive from ISceneNode, because the contained scene node can be an IAnimatedMeshSceneNode, a ITerrainSceneNode, etc...) and you want to retrieve this class by using picking commands, like getSceneNodeFromScreenCoordinates(). This function returns an ISceneNode, and actually if you want to retrieve the linked Entity, you have to modify the engine...
With these function:
Code: Select all
void setUserData(void* data);
void* getUserData();
The patch needed for that is not very hard to do, I could make it if you want, but first I wanted to have your opinion.
So , what do you think about this feature ? (agree, disagree, etc...)