Add missing implementation for CDummyTransformationSceneNode::clone (thx @ Voxel for reporting)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3854 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2011-06-16 21:18:31 +00:00
parent 6d9fa7d053
commit 3d930cba96
3 changed files with 27 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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;