diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/include/ISceneNodeFactory.h | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/libraries/irrlicht-1.8/include/ISceneNodeFactory.h b/libraries/irrlicht-1.8/include/ISceneNodeFactory.h index 5359d2b..247b47b 100644 --- a/libraries/irrlicht-1.8/include/ISceneNodeFactory.h +++ b/libraries/irrlicht-1.8/include/ISceneNodeFactory.h | |||
@@ -1,68 +1,68 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_SCENE_NODE_FACTORY_H_INCLUDED__ | 5 | #ifndef __I_SCENE_NODE_FACTORY_H_INCLUDED__ |
6 | #define __I_SCENE_NODE_FACTORY_H_INCLUDED__ | 6 | #define __I_SCENE_NODE_FACTORY_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | #include "ESceneNodeTypes.h" | 9 | #include "ESceneNodeTypes.h" |
10 | 10 | ||
11 | namespace irr | 11 | namespace irr |
12 | { | 12 | { |
13 | 13 | ||
14 | namespace scene | 14 | namespace scene |
15 | { | 15 | { |
16 | class ISceneNode; | 16 | class ISceneNode; |
17 | 17 | ||
18 | //! Interface for dynamic creation of scene nodes | 18 | //! Interface for dynamic creation of scene nodes |
19 | /** To be able to add custom scene nodes to Irrlicht and to make it possible for the | 19 | /** To be able to add custom scene nodes to Irrlicht and to make it possible for the |
20 | scene manager to save and load those external scene nodes, simply implement this | 20 | scene manager to save and load those external scene nodes, simply implement this |
21 | interface and register it in you scene manager via ISceneManager::registerSceneNodeFactory. | 21 | interface and register it in you scene manager via ISceneManager::registerSceneNodeFactory. |
22 | Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to | 22 | Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to |
23 | increase the reference counter of the scene node manager. This is not necessary because the | 23 | increase the reference counter of the scene node manager. This is not necessary because the |
24 | scene node manager will grab() the factory anyway, and otherwise cyclic references will | 24 | scene node manager will grab() the factory anyway, and otherwise cyclic references will |
25 | be created and the scene manager and all its nodes won't get deallocated. | 25 | be created and the scene manager and all its nodes won't get deallocated. |
26 | */ | 26 | */ |
27 | class ISceneNodeFactory : public virtual IReferenceCounted | 27 | class ISceneNodeFactory : public virtual IReferenceCounted |
28 | { | 28 | { |
29 | public: | 29 | public: |
30 | //! adds a scene node to the scene graph based on its type id | 30 | //! adds a scene node to the scene graph based on its type id |
31 | /** \param type: Type of the scene node to add. | 31 | /** \param type: Type of the scene node to add. |
32 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. | 32 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. |
33 | \return Returns pointer to the new scene node or null if not successful. | 33 | \return Returns pointer to the new scene node or null if not successful. |
34 | This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ | 34 | This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ |
35 | virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0) = 0; | 35 | virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0) = 0; |
36 | 36 | ||
37 | //! adds a scene node to the scene graph based on its type name | 37 | //! adds a scene node to the scene graph based on its type name |
38 | /** \param typeName: Type name of the scene node to add. | 38 | /** \param typeName: Type name of the scene node to add. |
39 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. | 39 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. |
40 | \return Returns pointer to the new scene node or null if not successful. | 40 | \return Returns pointer to the new scene node or null if not successful. |
41 | This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ | 41 | This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ |
42 | virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0) = 0; | 42 | virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0) = 0; |
43 | 43 | ||
44 | //! returns amount of scene node types this factory is able to create | 44 | //! returns amount of scene node types this factory is able to create |
45 | virtual u32 getCreatableSceneNodeTypeCount() const = 0; | 45 | virtual u32 getCreatableSceneNodeTypeCount() const = 0; |
46 | 46 | ||
47 | //! returns type of a createable scene node type | 47 | //! returns type of a createable scene node type |
48 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and | 48 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and |
49 | getCreatableSceneNodeTypeCount() */ | 49 | getCreatableSceneNodeTypeCount() */ |
50 | virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0; | 50 | virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0; |
51 | 51 | ||
52 | //! returns type name of a createable scene node type by index | 52 | //! returns type name of a createable scene node type by index |
53 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and | 53 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and |
54 | getCreatableSceneNodeTypeCount() */ | 54 | getCreatableSceneNodeTypeCount() */ |
55 | virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0; | 55 | virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0; |
56 | 56 | ||
57 | //! returns type name of a createable scene node type | 57 | //! returns type name of a createable scene node type |
58 | /** \param type: Type of scene node. | 58 | /** \param type: Type of scene node. |
59 | \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ | 59 | \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ |
60 | virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0; | 60 | virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | 63 | ||
64 | } // end namespace scene | 64 | } // end namespace scene |
65 | } // end namespace irr | 65 | } // end namespace irr |
66 | 66 | ||
67 | #endif | 67 | #endif |
68 | 68 | ||