Saga3D API Documentation
1.0-RC4
|
Interface for dynamic creation of scene nodes. More...
#include <ISceneNodeFactory.h>
Public Member Functions | |
virtual ISceneNode * | addSceneNode (E_SCENE_NODE_TYPE type, ISceneNode *parent=0)=0 |
adds a scene node to the scene graph based on its type id More... | |
virtual ISceneNode * | addSceneNode (const char *typeName, ISceneNode *parent=0)=0 |
adds a scene node to the scene graph based on its type name More... | |
virtual std::uint32_t | getCreatableSceneNodeTypeCount () const =0 |
returns amount of scene node types this factory is able to create More... | |
virtual E_SCENE_NODE_TYPE | getCreateableSceneNodeType (std::uint32_t idx) const =0 |
returns type of a creatable scene node type More... | |
virtual const char * | getCreateableSceneNodeTypeName (std::uint32_t idx) const =0 |
returns type name of a creatable scene node type by index More... | |
virtual const char * | getCreateableSceneNodeTypeName (E_SCENE_NODE_TYPE type) const =0 |
returns type name of a creatable scene node type More... | |
Interface for dynamic creation of scene nodes.
To be able to add custom scene nodes to Irrlicht and to make it possible for the scene manager to save and load those external scene nodes, simply implement this interface and register it in you scene manager via ISceneManager::registerNodeFactory. Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to increase the reference counter of the scene node manager. This is not necessary because the scene node manager will grab() the factory anyway, and otherwise cyclic references will be created and the scene manager and all its nodes won't get deallocated.
Definition at line 27 of file ISceneNodeFactory.h.
|
pure virtual |
adds a scene node to the scene graph based on its type name
typeName | Type name of the scene node to add. |
parent | Parent scene node of the new node, can be null to add the scene node to the root. |
|
pure virtual |
adds a scene node to the scene graph based on its type id
type | Type of the scene node to add. |
parent | Parent scene node of the new node, can be null to add the scene node to the root. |
|
pure virtual |
returns amount of scene node types this factory is able to create
|
pure virtual |
returns type of a creatable scene node type
idx | Index of scene node type in this factory. Must be a value between 0 and getCreatableSceneNodeTypeCount() |
|
pure virtual |
returns type name of a creatable scene node type
type | Type of scene node. |
|
pure virtual |
returns type name of a creatable scene node type by index
idx | Index of scene node type in this factory. Must be a value between 0 and getCreatableSceneNodeTypeCount() |