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"
14 CDummyTransformationSceneNode::CDummyTransformationSceneNode(
15 ISceneNode
*parent
, ISceneManager
*mgr
, s32 id
) :
16 IDummyTransformationSceneNode(parent
, mgr
, id
)
19 setDebugName("CDummyTransformationSceneNode");
22 setAutomaticCulling(scene::EAC_OFF
);
25 //! returns the axis aligned bounding box of this node
26 const core::aabbox3d
<f32
> &CDummyTransformationSceneNode::getBoundingBox() const
31 //! Returns a reference to the current relative transformation matrix.
32 //! This is the matrix, this scene node uses instead of scale, translation
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
)
51 newManager
= SceneManager
;
53 CDummyTransformationSceneNode
*nb
= new CDummyTransformationSceneNode(newParent
,
56 nb
->cloneMembers(this, newManager
);
57 nb
->RelativeTransformationMatrix
= RelativeTransformationMatrix
;
65 const core::vector3df
&CDummyTransformationSceneNode::getScale() const
67 os::Printer::log("CDummyTransformationSceneNode::getScale() does not contain the relative transformation.", ELL_DEBUG
);
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