diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CEmptySceneNode.cpp')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CEmptySceneNode.cpp | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CEmptySceneNode.cpp b/libraries/irrlicht-1.8/source/Irrlicht/CEmptySceneNode.cpp index fc1b931..bc18b33 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CEmptySceneNode.cpp +++ b/libraries/irrlicht-1.8/source/Irrlicht/CEmptySceneNode.cpp | |||
@@ -1,70 +1,70 @@ | |||
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 | #include "CEmptySceneNode.h" | 5 | #include "CEmptySceneNode.h" |
6 | #include "ISceneManager.h" | 6 | #include "ISceneManager.h" |
7 | 7 | ||
8 | namespace irr | 8 | namespace irr |
9 | { | 9 | { |
10 | namespace scene | 10 | namespace scene |
11 | { | 11 | { |
12 | 12 | ||
13 | //! constructor | 13 | //! constructor |
14 | CEmptySceneNode::CEmptySceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) | 14 | CEmptySceneNode::CEmptySceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) |
15 | : ISceneNode(parent, mgr, id) | 15 | : ISceneNode(parent, mgr, id) |
16 | { | 16 | { |
17 | #ifdef _DEBUG | 17 | #ifdef _DEBUG |
18 | setDebugName("CEmptySceneNode"); | 18 | setDebugName("CEmptySceneNode"); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | setAutomaticCulling(scene::EAC_OFF); | 21 | setAutomaticCulling(scene::EAC_OFF); |
22 | } | 22 | } |
23 | 23 | ||
24 | 24 | ||
25 | //! pre render event | 25 | //! pre render event |
26 | void CEmptySceneNode::OnRegisterSceneNode() | 26 | void CEmptySceneNode::OnRegisterSceneNode() |
27 | { | 27 | { |
28 | if (IsVisible) | 28 | if (IsVisible) |
29 | SceneManager->registerNodeForRendering(this); | 29 | SceneManager->registerNodeForRendering(this); |
30 | 30 | ||
31 | ISceneNode::OnRegisterSceneNode(); | 31 | ISceneNode::OnRegisterSceneNode(); |
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
35 | //! render | 35 | //! render |
36 | void CEmptySceneNode::render() | 36 | void CEmptySceneNode::render() |
37 | { | 37 | { |
38 | // do nothing | 38 | // do nothing |
39 | } | 39 | } |
40 | 40 | ||
41 | 41 | ||
42 | //! returns the axis aligned bounding box of this node | 42 | //! returns the axis aligned bounding box of this node |
43 | const core::aabbox3d<f32>& CEmptySceneNode::getBoundingBox() const | 43 | const core::aabbox3d<f32>& CEmptySceneNode::getBoundingBox() const |
44 | { | 44 | { |
45 | return Box; | 45 | return Box; |
46 | } | 46 | } |
47 | 47 | ||
48 | 48 | ||
49 | //! Creates a clone of this scene node and its children. | 49 | //! Creates a clone of this scene node and its children. |
50 | ISceneNode* CEmptySceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) | 50 | ISceneNode* CEmptySceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) |
51 | { | 51 | { |
52 | if (!newParent) | 52 | if (!newParent) |
53 | newParent = Parent; | 53 | newParent = Parent; |
54 | if (!newManager) | 54 | if (!newManager) |
55 | newManager = SceneManager; | 55 | newManager = SceneManager; |
56 | 56 | ||
57 | CEmptySceneNode* nb = new CEmptySceneNode(newParent, | 57 | CEmptySceneNode* nb = new CEmptySceneNode(newParent, |
58 | newManager, ID); | 58 | newManager, ID); |
59 | 59 | ||
60 | nb->cloneMembers(this, newManager); | 60 | nb->cloneMembers(this, newManager); |
61 | nb->Box = Box; | 61 | nb->Box = Box; |
62 | 62 | ||
63 | if ( newParent ) | 63 | if ( newParent ) |
64 | nb->drop(); | 64 | nb->drop(); |
65 | return nb; | 65 | return nb; |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
69 | } // end namespace scene | 69 | } // end namespace scene |
70 | } // end namespace irr | 70 | } // end namespace irr |