Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/SceneGraph/SG_Node.cpp')
-rw-r--r--source/gameengine/SceneGraph/SG_Node.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/gameengine/SceneGraph/SG_Node.cpp b/source/gameengine/SceneGraph/SG_Node.cpp
index 2436f6ecb55..1d27dfa1388 100644
--- a/source/gameengine/SceneGraph/SG_Node.cpp
+++ b/source/gameengine/SceneGraph/SG_Node.cpp
@@ -30,10 +30,6 @@
#include "SG_ParentRelation.h"
#include <algorithm>
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
using namespace std;
@@ -150,6 +146,12 @@ GetRootSGParent(
return (m_SGparent ? (const SG_Node*) m_SGparent->GetRootSGParent() : (const SG_Node*) this);
}
+bool SG_Node::IsAncessor(const SG_Node* child) const
+{
+ return (!child->m_SGparent) ? false :
+ (child->m_SGparent == this) ? true : IsAncessor(child->m_SGparent);
+}
+
void
SG_Node::
DisconnectFromParent(