aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp
new file mode 100644
index 0000000..fc1b931
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CEmptySceneNode.cpp
@@ -0,0 +1,70 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#include "CEmptySceneNode.h"
6#include "ISceneManager.h"
7
8namespace irr
9{
10namespace scene
11{
12
13//! constructor
14CEmptySceneNode::CEmptySceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
15: ISceneNode(parent, mgr, id)
16{
17 #ifdef _DEBUG
18 setDebugName("CEmptySceneNode");
19 #endif
20
21 setAutomaticCulling(scene::EAC_OFF);
22}
23
24
25//! pre render event
26void CEmptySceneNode::OnRegisterSceneNode()
27{
28 if (IsVisible)
29 SceneManager->registerNodeForRendering(this);
30
31 ISceneNode::OnRegisterSceneNode();
32}
33
34
35//! render
36void CEmptySceneNode::render()
37{
38 // do nothing
39}
40
41
42//! returns the axis aligned bounding box of this node
43const core::aabbox3d<f32>& CEmptySceneNode::getBoundingBox() const
44{
45 return Box;
46}
47
48
49//! Creates a clone of this scene node and its children.
50ISceneNode* CEmptySceneNode::clone(ISceneNode* newParent, ISceneManager* newManager)
51{
52 if (!newParent)
53 newParent = Parent;
54 if (!newManager)
55 newManager = SceneManager;
56
57 CEmptySceneNode* nb = new CEmptySceneNode(newParent,
58 newManager, ID);
59
60 nb->cloneMembers(this, newManager);
61 nb->Box = Box;
62
63 if ( newParent )
64 nb->drop();
65 return nb;
66}
67
68
69} // end namespace scene
70} // end namespace irr