diff options
Diffstat (limited to 'source/gameengine/SceneGraph')
-rw-r--r-- | source/gameengine/SceneGraph/SG_Node.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/SceneGraph/SG_Node.h | 8 | ||||
-rw-r--r-- | source/gameengine/SceneGraph/SG_ParentRelation.h | 9 |
3 files changed, 27 insertions, 0 deletions
diff --git a/source/gameengine/SceneGraph/SG_Node.cpp b/source/gameengine/SceneGraph/SG_Node.cpp index 73e16863173..ff9a9f7f371 100644 --- a/source/gameengine/SceneGraph/SG_Node.cpp +++ b/source/gameengine/SceneGraph/SG_Node.cpp @@ -148,6 +148,16 @@ GetRootSGParent( return (m_SGparent ? (const SG_Node*) m_SGparent->GetRootSGParent() : (const SG_Node*) this); } + bool +SG_Node:: +IsVertexParent() +{ + if (m_parent_relation) + { + return m_parent_relation->IsVertexRelation(); + } + return false; +} void SG_Node:: diff --git a/source/gameengine/SceneGraph/SG_Node.h b/source/gameengine/SceneGraph/SG_Node.h index 4808f6f7d94..5cf24de68f3 100644 --- a/source/gameengine/SceneGraph/SG_Node.h +++ b/source/gameengine/SceneGraph/SG_Node.h @@ -152,6 +152,14 @@ public: ) ; + /** + * Return vertex parent status. + */ + + bool + IsVertexParent( + ) ; + /** * Update the spatial data of this node. Iterate through * the children of this node and update their world data. diff --git a/source/gameengine/SceneGraph/SG_ParentRelation.h b/source/gameengine/SceneGraph/SG_ParentRelation.h index 1d211a9f39f..9d360d1c274 100644 --- a/source/gameengine/SceneGraph/SG_ParentRelation.h +++ b/source/gameengine/SceneGraph/SG_ParentRelation.h @@ -90,6 +90,15 @@ public : NewCopy( ) = 0; + /** + * Vertex Parent Relation are special: they don't propagate rotation + */ + virtual + bool + IsVertexRelation( + ) { + return false; + } protected : /** |