I used to design my custom classes
by aggregating pointers to SceneNodes and other objects (physics, network usw).
But this implies at least overhead in handling access right to the different objects and managing the classes itself.
A more speedy way would be just to inherit
from the build in classes and to overwrite the methods needed,
as this allows polymorphism. Also the SceneManager is
designed for tasks in managing SceneNodes and there would be no overhead.
Therefore it would be of advantage to use the Irrlicht
SceneManager to create my custom nodes.
I noticed that latest Irrlicht releases support now a method:
ISceneManager::registerSceneNodeFactory (ISceneNodeFactory* factoryToAdd)
The only thread I found dealing with this topic is:
http://irrlicht.sourceforge.net/phpBB2/ ... odefactory
but it did not help so much.
Does someone has experience how to use this feature and can help me out?
How to use custom ISceneNodeFactory
-
- Posts: 63
- Joined: Thu Aug 05, 2004 9:40 am
- Location: Germany
Take a look at the Irrlicht source (CDefaultSceneNodeFactory.h/cpp).
If you want a specific example, look at the example plugins found within the irredit package. (Think they're outdated regarding changed datatypes etc. but they should give you a good hint on how to do it.)
How to use it once your own factory class is created - look at your own link.
If you want a specific example, look at the example plugins found within the irredit package. (Think they're outdated regarding changed datatypes etc. but they should give you a good hint on how to do it.)
How to use it once your own factory class is created - look at your own link.
-
- Posts: 63
- Joined: Thu Aug 05, 2004 9:40 am
- Location: Germany