(SceneNode) Added Remove() method

Former-commit-id: 191834826b1c6651dab62c77aabb072ba59a301b
This commit is contained in:
Lynix 2015-01-25 23:53:00 +01:00
parent 0db92e671d
commit eed90cb683
2 changed files with 10 additions and 0 deletions

View File

@ -52,6 +52,8 @@ class NAZARA_API NzSceneNode : public NzNode
bool IsDrawingEnabled() const;
bool IsVisible() const;
void Remove();
bool SetName(const NzString& name);
NzSceneNode& operator=(const NzSceneNode& sceneNode);

View File

@ -144,6 +144,14 @@ bool NzSceneNode::IsVisible() const
return m_visible;
}
void NzSceneNode::Remove()
{
if (m_scene)
m_scene->RemoveNode(this);
else
NazaraError("SceneNode::Remove() called on a template node");
}
bool NzSceneNode::SetName(const NzString& name)
{
if (m_scene)