Commit c8c80280 authored by hybrid's avatar hybrid

Add clone method for camera.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2766 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 719e8cb9
......@@ -345,6 +345,24 @@ bool CCameraSceneNode::getTargetAndRotationBinding(void) const
}
//! Creates a clone of this scene node and its children.
ISceneNode* CCameraSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager)
{
if (!newParent)
newParent = Parent;
if (!newManager)
newManager = SceneManager;
CCameraSceneNode* nb = new CCameraSceneNode(newParent,
newManager, ID, RelativeTranslation, Target);
nb->cloneMembers(this, newManager);
nb->drop();
return nb;
}
} // end namespace
} // end namespace
......@@ -142,6 +142,9 @@ namespace scene
//! Queries if the camera scene node's rotation and its target position are bound together.
virtual bool getTargetAndRotationBinding(void) const;
//! Creates a clone of this scene node and its children.
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
protected:
void recalculateProjectionMatrix();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment