Custom animated scene node

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
maroxe
Posts: 51
Joined: Wed Dec 10, 2008 1:52 pm

Custom animated scene node

Post by maroxe »

Hi,
i want to implemnt a custom animated scene node.
so i inherited my class from IAnimatedMeshSceneNode.
i've overritten OnRegisterSceneNode. but since my class is not a direct child of ISceneNode, i can't call ISceneNode:: OnRegisterSceneNode() as the doc says.
:(
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

As a general rule, you want to call the method on your base class, whatever that happens to be. In this case you would call IAnimatedMeshSceneNode::OnRegisterSceneNode(). If the class you inherit from doesn't implement (override) the virtual function, that is okay. The call will resolve to the override in the most derived base class that implements it. In this case it will resolve to ISceneNode::OnRegisterSceneNode().

Travis
Post Reply