saladin
13-08-2008 13:57:40
Hi,
I am trying to subclass the SceneNode class and add some properties/behaviours to it to form my own scene graph.
like this:
Well, this does all the tricks as far as the scene graph is concerned. But since it didn't go through the process sceneManager.createSceneNode, the scene node is not registered with sceneManager.mSceneNodes. Hence it cannot be found when I call sceneManager.hasSceneNode(bar1.name) or sceneManager.destroySceneNode(bar1.name).
Apart from using a sceneNode as component and hand wrap functions of my class, what can I do to solve this problem? Maybe we can have access func to SceneManager.mSceneNodes in future releases?
I am trying to subclass the SceneNode class and add some properties/behaviours to it to form my own scene graph.
like this:
class Foo(ogre.SceneNode):
pass
bar = Foo(sceneManager)
spam = Foo(sceneManager)
spam.addChild(bar)
Well, this does all the tricks as far as the scene graph is concerned. But since it didn't go through the process sceneManager.createSceneNode, the scene node is not registered with sceneManager.mSceneNodes. Hence it cannot be found when I call sceneManager.hasSceneNode(bar1.name) or sceneManager.destroySceneNode(bar1.name).
Apart from using a sceneNode as component and hand wrap functions of my class, what can I do to solve this problem? Maybe we can have access func to SceneManager.mSceneNodes in future releases?