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