diff --git a/changes.txt b/changes.txt index e1c4748e..6cca0904 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,9 @@ Changes in 1.8 (??.??.2011) + - CDummyTransformationSceneNode::clone() added. + + - IParticleSystemSceneNode::doParticleSystem now public to allow rendering outside scenegraph. + - Renamed IOSOperator::getOperationSystemVersion to getOperatingSystemVersion. Changed return type from wchar_t to core::stringc, as that's the internal representation the name is built on. - Added IGUITabControl::insertTab, IGUITabControl::removeTab, IGUITabControl::clear and IGUITabControl::getTabAt diff --git a/source/Irrlicht/CDummyTransformationSceneNode.cpp b/source/Irrlicht/CDummyTransformationSceneNode.cpp index d279a783..ddc0d7fb 100644 --- a/source/Irrlicht/CDummyTransformationSceneNode.cpp +++ b/source/Irrlicht/CDummyTransformationSceneNode.cpp @@ -44,6 +44,25 @@ core::matrix4 CDummyTransformationSceneNode::getRelativeTransformation() const return RelativeTransformationMatrix; } +//! Creates a clone of this scene node and its children. +ISceneNode* CDummyTransformationSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) +{ + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; + + CDummyTransformationSceneNode* nb = new CDummyTransformationSceneNode(newParent, + newManager, ID); + + nb->cloneMembers(this, newManager); + nb->RelativeTransformationMatrix = RelativeTransformationMatrix; + nb->Box = Box; + + if ( newParent ) + nb->drop(); + return nb; +} } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CDummyTransformationSceneNode.h b/source/Irrlicht/CDummyTransformationSceneNode.h index 94650bc5..607fcd51 100644 --- a/source/Irrlicht/CDummyTransformationSceneNode.h +++ b/source/Irrlicht/CDummyTransformationSceneNode.h @@ -36,6 +36,10 @@ namespace scene //! Returns type of the scene node virtual ESCENE_NODE_TYPE getType() const { return ESNT_DUMMY_TRANSFORMATION; } + //! Creates a clone of this scene node and its children. + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + + private: core::matrix4 RelativeTransformationMatrix;