diff options
author | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
commit | 7028cbe09c688437910a25623098762bf0fa592d (patch) | |
tree | 10b5af58277d9880380c2251f109325542c4e6eb /src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp | |
parent | Move lemon to the src/others directory. (diff) | |
download | SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2 SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz |
Move Irrlicht to src/others.
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp')
-rw-r--r-- | src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp new file mode 100644 index 0000000..812145a --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDummyTransformationSceneNode.cpp | |||
@@ -0,0 +1,105 @@ | |||
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 "CDummyTransformationSceneNode.h" | ||
6 | #include "os.h" | ||
7 | |||
8 | namespace irr | ||
9 | { | ||
10 | namespace scene | ||
11 | { | ||
12 | |||
13 | //! constructor | ||
14 | CDummyTransformationSceneNode::CDummyTransformationSceneNode( | ||
15 | ISceneNode* parent, ISceneManager* mgr, s32 id) | ||
16 | : IDummyTransformationSceneNode(parent, mgr, id) | ||
17 | { | ||
18 | #ifdef _DEBUG | ||
19 | setDebugName("CDummyTransformationSceneNode"); | ||
20 | #endif | ||
21 | |||
22 | setAutomaticCulling(scene::EAC_OFF); | ||
23 | } | ||
24 | |||
25 | |||
26 | //! returns the axis aligned bounding box of this node | ||
27 | const core::aabbox3d<f32>& CDummyTransformationSceneNode::getBoundingBox() const | ||
28 | { | ||
29 | return Box; | ||
30 | } | ||
31 | |||
32 | |||
33 | //! Returns a reference to the current relative transformation matrix. | ||
34 | //! This is the matrix, this scene node uses instead of scale, translation | ||
35 | //! and rotation. | ||
36 | core::matrix4& CDummyTransformationSceneNode::getRelativeTransformationMatrix() | ||
37 | { | ||
38 | return RelativeTransformationMatrix; | ||
39 | } | ||
40 | |||
41 | |||
42 | //! Returns the relative transformation of the scene node. | ||
43 | core::matrix4 CDummyTransformationSceneNode::getRelativeTransformation() const | ||
44 | { | ||
45 | return RelativeTransformationMatrix; | ||
46 | } | ||
47 | |||
48 | //! Creates a clone of this scene node and its children. | ||
49 | ISceneNode* CDummyTransformationSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) | ||
50 | { | ||
51 | if (!newParent) | ||
52 | newParent = Parent; | ||
53 | if (!newManager) | ||
54 | newManager = SceneManager; | ||
55 | |||
56 | CDummyTransformationSceneNode* nb = new CDummyTransformationSceneNode(newParent, | ||
57 | newManager, ID); | ||
58 | |||
59 | nb->cloneMembers(this, newManager); | ||
60 | nb->RelativeTransformationMatrix = RelativeTransformationMatrix; | ||
61 | nb->Box = Box; | ||
62 | |||
63 | if ( newParent ) | ||
64 | nb->drop(); | ||
65 | return nb; | ||
66 | } | ||
67 | |||
68 | const core::vector3df& CDummyTransformationSceneNode::getScale() const | ||
69 | { | ||
70 | os::Printer::log("CDummyTransformationSceneNode::getScale() does not contain the relative transformation.", ELL_DEBUG); | ||
71 | return RelativeScale; | ||
72 | } | ||
73 | |||
74 | void CDummyTransformationSceneNode::setScale(const core::vector3df& scale) | ||
75 | { | ||
76 | os::Printer::log("CDummyTransformationSceneNode::setScale() does not affect the relative transformation.", ELL_DEBUG); | ||
77 | RelativeScale = scale; | ||
78 | } | ||
79 | |||
80 | const core::vector3df& CDummyTransformationSceneNode::getRotation() const | ||
81 | { | ||
82 | os::Printer::log("CDummyTransformationSceneNode::getRotation() does not contain the relative transformation.", ELL_DEBUG); | ||
83 | return RelativeRotation; | ||
84 | } | ||
85 | |||
86 | void CDummyTransformationSceneNode::setRotation(const core::vector3df& rotation) | ||
87 | { | ||
88 | os::Printer::log("CDummyTransformationSceneNode::setRotation() does not affect the relative transformation.", ELL_DEBUG); | ||
89 | RelativeRotation = rotation; | ||
90 | } | ||
91 | |||
92 | const core::vector3df& CDummyTransformationSceneNode::getPosition() const | ||
93 | { | ||
94 | os::Printer::log("CDummyTransformationSceneNode::getPosition() does not contain the relative transformation.", ELL_DEBUG); | ||
95 | return RelativeTranslation; | ||
96 | } | ||
97 | |||
98 | void CDummyTransformationSceneNode::setPosition(const core::vector3df& newpos) | ||
99 | { | ||
100 | os::Printer::log("CDummyTransformationSceneNode::setPosition() does not affect the relative transformation.", ELL_DEBUG); | ||
101 | RelativeTranslation = newpos; | ||
102 | } | ||
103 | |||
104 | } // end namespace scene | ||
105 | } // end namespace irr | ||