diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CDefaultSceneNodeFactory.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CDefaultSceneNodeFactory.h | 160 |
1 files changed, 80 insertions, 80 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CDefaultSceneNodeFactory.h b/libraries/irrlicht-1.8/source/Irrlicht/CDefaultSceneNodeFactory.h index 5ed2036..fe3bbc8 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CDefaultSceneNodeFactory.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CDefaultSceneNodeFactory.h | |||
@@ -1,80 +1,80 @@ | |||
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 __C_DEFAULT_SCENE_NODE_FACTORY_H_INCLUDED__ | 5 | #ifndef __C_DEFAULT_SCENE_NODE_FACTORY_H_INCLUDED__ |
6 | #define __C_DEFAULT_SCENE_NODE_FACTORY_H_INCLUDED__ | 6 | #define __C_DEFAULT_SCENE_NODE_FACTORY_H_INCLUDED__ |
7 | 7 | ||
8 | #include "ISceneNodeFactory.h" | 8 | #include "ISceneNodeFactory.h" |
9 | #include "irrArray.h" | 9 | #include "irrArray.h" |
10 | #include "irrString.h" | 10 | #include "irrString.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace scene | 14 | namespace scene |
15 | { | 15 | { |
16 | class ISceneNode; | 16 | class ISceneNode; |
17 | class ISceneManager; | 17 | class ISceneManager; |
18 | 18 | ||
19 | //! Interface making it possible to dynamicly create scene nodes and animators | 19 | //! Interface making it possible to dynamicly create scene nodes and animators |
20 | class CDefaultSceneNodeFactory : public ISceneNodeFactory | 20 | class CDefaultSceneNodeFactory : public ISceneNodeFactory |
21 | { | 21 | { |
22 | public: | 22 | public: |
23 | 23 | ||
24 | CDefaultSceneNodeFactory(ISceneManager* mgr); | 24 | CDefaultSceneNodeFactory(ISceneManager* mgr); |
25 | 25 | ||
26 | //! adds a scene node to the scene graph based on its type id | 26 | //! adds a scene node to the scene graph based on its type id |
27 | /** \param type: Type of the scene node to add. | 27 | /** \param type: Type of the scene node to add. |
28 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. | 28 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. |
29 | \return Returns pointer to the new scene node or null if not successful. */ | 29 | \return Returns pointer to the new scene node or null if not successful. */ |
30 | virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0); | 30 | virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0); |
31 | 31 | ||
32 | //! adds a scene node to the scene graph based on its type name | 32 | //! adds a scene node to the scene graph based on its type name |
33 | /** \param typeName: Type name of the scene node to add. | 33 | /** \param typeName: Type name of the scene node to add. |
34 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. | 34 | \param parent: Parent scene node of the new node, can be null to add the scene node to the root. |
35 | \return Returns pointer to the new scene node or null if not successful. */ | 35 | \return Returns pointer to the new scene node or null if not successful. */ |
36 | virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0); | 36 | virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0); |
37 | 37 | ||
38 | //! returns amount of scene node types this factory is able to create | 38 | //! returns amount of scene node types this factory is able to create |
39 | virtual u32 getCreatableSceneNodeTypeCount() const; | 39 | virtual u32 getCreatableSceneNodeTypeCount() const; |
40 | 40 | ||
41 | //! returns type name of a createable scene node type by index | 41 | //! returns type name of a createable scene node type by index |
42 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and | 42 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and |
43 | uetCreatableSceneNodeTypeCount() */ | 43 | uetCreatableSceneNodeTypeCount() */ |
44 | virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const; | 44 | virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const; |
45 | 45 | ||
46 | //! returns type of a createable scene node type | 46 | //! returns type of a createable scene node type |
47 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and | 47 | /** \param idx: Index of scene node type in this factory. Must be a value between 0 and |
48 | getCreatableSceneNodeTypeCount() */ | 48 | getCreatableSceneNodeTypeCount() */ |
49 | virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const; | 49 | virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const; |
50 | 50 | ||
51 | //! returns type name of a createable scene node type | 51 | //! returns type name of a createable scene node type |
52 | /** \param idx: Type of scene node. | 52 | /** \param idx: Type of scene node. |
53 | \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ | 53 | \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ |
54 | virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const; | 54 | virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const; |
55 | 55 | ||
56 | private: | 56 | private: |
57 | 57 | ||
58 | ESCENE_NODE_TYPE getTypeFromName(const c8* name) const; | 58 | ESCENE_NODE_TYPE getTypeFromName(const c8* name) const; |
59 | 59 | ||
60 | struct SSceneNodeTypePair | 60 | struct SSceneNodeTypePair |
61 | { | 61 | { |
62 | SSceneNodeTypePair(ESCENE_NODE_TYPE type, const c8* name) | 62 | SSceneNodeTypePair(ESCENE_NODE_TYPE type, const c8* name) |
63 | : Type(type), TypeName(name) | 63 | : Type(type), TypeName(name) |
64 | {} | 64 | {} |
65 | 65 | ||
66 | ESCENE_NODE_TYPE Type; | 66 | ESCENE_NODE_TYPE Type; |
67 | core::stringc TypeName; | 67 | core::stringc TypeName; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | core::array<SSceneNodeTypePair> SupportedSceneNodeTypes; | 70 | core::array<SSceneNodeTypePair> SupportedSceneNodeTypes; |
71 | 71 | ||
72 | ISceneManager* Manager; | 72 | ISceneManager* Manager; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | 75 | ||
76 | } // end namespace scene | 76 | } // end namespace scene |
77 | } // end namespace irr | 77 | } // end namespace irr |
78 | 78 | ||
79 | #endif | 79 | #endif |
80 | 80 | ||