mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-09 01:03:51 +01:00
2ae2a551a6
GLES drivers adapted, but only did make compile-tests. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6038 dfc29bdd-3216-0410-991c-e03cc46cb475
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
|
// This file is part of the "Irrlicht Engine".
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
#include "CSceneNodeAnimatorDelete.h"
|
|
#include "ISceneManager.h"
|
|
|
|
namespace irr
|
|
{
|
|
namespace scene
|
|
{
|
|
|
|
|
|
//! constructor
|
|
CSceneNodeAnimatorDelete::CSceneNodeAnimatorDelete(ISceneManager* manager, u32 time)
|
|
: ISceneNodeAnimatorFinishing(time), SceneManager(manager)
|
|
{
|
|
#ifdef _DEBUG
|
|
setDebugName("CSceneNodeAnimatorDelete");
|
|
#endif
|
|
}
|
|
|
|
|
|
//! animates a scene node
|
|
void CSceneNodeAnimatorDelete::animateNode(ISceneNode* node, u32 timeMs)
|
|
{
|
|
if (timeMs > FinishTime+PauseTimeSum)
|
|
{
|
|
HasFinished = true;
|
|
if(node && SceneManager)
|
|
{
|
|
// don't delete if scene manager is attached to an editor
|
|
if (!SceneManager->getParameters()->getAttributeAsBool(IRR_SCENE_MANAGER_IS_EDITOR))
|
|
SceneManager->addToDeletionQueue(node);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
ISceneNodeAnimator* CSceneNodeAnimatorDelete::createClone(ISceneNode* node, ISceneManager* newManager)
|
|
{
|
|
if (!newManager)
|
|
newManager = SceneManager;
|
|
|
|
CSceneNodeAnimatorDelete* newAnimator =
|
|
new CSceneNodeAnimatorDelete(newManager, FinishTime);
|
|
newAnimator->cloneMembers(this);
|
|
|
|
return newAnimator;
|
|
}
|
|
|
|
|
|
} // end namespace scene
|
|
} // end namespace irr
|
|
|