Use openssl's sha1 and sha256, optionally (#15472)
[minetest.git] / irr / src / CDummyTransformationSceneNode.cpp
blob73953dd38d5536db3c751583a4cb75a73796ecea
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
5 #include "CDummyTransformationSceneNode.h"
6 #include "os.h"
8 namespace irr
10 namespace scene
13 //! constructor
14 CDummyTransformationSceneNode::CDummyTransformationSceneNode(
15 ISceneNode *parent, ISceneManager *mgr, s32 id) :
16 IDummyTransformationSceneNode(parent, mgr, id)
18 #ifdef _DEBUG
19 setDebugName("CDummyTransformationSceneNode");
20 #endif
22 setAutomaticCulling(scene::EAC_OFF);
25 //! returns the axis aligned bounding box of this node
26 const core::aabbox3d<f32> &CDummyTransformationSceneNode::getBoundingBox() const
28 return Box;
31 //! Returns a reference to the current relative transformation matrix.
32 //! This is the matrix, this scene node uses instead of scale, translation
33 //! and rotation.
34 core::matrix4 &CDummyTransformationSceneNode::getRelativeTransformationMatrix()
36 return RelativeTransformationMatrix;
39 //! Returns the relative transformation of the scene node.
40 core::matrix4 CDummyTransformationSceneNode::getRelativeTransformation() const
42 return RelativeTransformationMatrix;
45 //! Creates a clone of this scene node and its children.
46 ISceneNode *CDummyTransformationSceneNode::clone(ISceneNode *newParent, ISceneManager *newManager)
48 if (!newParent)
49 newParent = Parent;
50 if (!newManager)
51 newManager = SceneManager;
53 CDummyTransformationSceneNode *nb = new CDummyTransformationSceneNode(newParent,
54 newManager, ID);
56 nb->cloneMembers(this, newManager);
57 nb->RelativeTransformationMatrix = RelativeTransformationMatrix;
58 nb->Box = Box;
60 if (newParent)
61 nb->drop();
62 return nb;
65 const core::vector3df &CDummyTransformationSceneNode::getScale() const
67 os::Printer::log("CDummyTransformationSceneNode::getScale() does not contain the relative transformation.", ELL_DEBUG);
68 return RelativeScale;
71 void CDummyTransformationSceneNode::setScale(const core::vector3df &scale)
73 os::Printer::log("CDummyTransformationSceneNode::setScale() does not affect the relative transformation.", ELL_DEBUG);
74 RelativeScale = scale;
77 const core::vector3df &CDummyTransformationSceneNode::getRotation() const
79 os::Printer::log("CDummyTransformationSceneNode::getRotation() does not contain the relative transformation.", ELL_DEBUG);
80 return RelativeRotation;
83 void CDummyTransformationSceneNode::setRotation(const core::vector3df &rotation)
85 os::Printer::log("CDummyTransformationSceneNode::setRotation() does not affect the relative transformation.", ELL_DEBUG);
86 RelativeRotation = rotation;
89 const core::vector3df &CDummyTransformationSceneNode::getPosition() const
91 os::Printer::log("CDummyTransformationSceneNode::getPosition() does not contain the relative transformation.", ELL_DEBUG);
92 return RelativeTranslation;
95 void CDummyTransformationSceneNode::setPosition(const core::vector3df &newpos)
97 os::Printer::log("CDummyTransformationSceneNode::setPosition() does not affect the relative transformation.", ELL_DEBUG);
98 RelativeTranslation = newpos;
101 } // end namespace scene
102 } // end namespace irr