From fc7a83b458811883b01e948a37e6177ae96602db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Jun 2008 17:12:49 +0000 Subject: Added access for adjusting timeOffset value at runtime, used for apricot (Franky climbing walls) --- source/gameengine/SceneGraph/SG_Node.cpp | 11 +++++++++++ source/gameengine/SceneGraph/SG_Node.h | 8 ++++++++ source/gameengine/SceneGraph/SG_ParentRelation.h | 10 ++++++++++ source/gameengine/SceneGraph/SG_Spatial.cpp | 7 +++++++ source/gameengine/SceneGraph/SG_Spatial.h | 4 ++++ 5 files changed, 40 insertions(+) (limited to 'source/gameengine/SceneGraph') diff --git a/source/gameengine/SceneGraph/SG_Node.cpp b/source/gameengine/SceneGraph/SG_Node.cpp index ff9a9f7f371..4e90d7c4653 100644 --- a/source/gameengine/SceneGraph/SG_Node.cpp +++ b/source/gameengine/SceneGraph/SG_Node.cpp @@ -159,6 +159,17 @@ IsVertexParent() return false; } + bool +SG_Node:: +IsSlowParent() +{ + if (m_parent_relation) + { + return m_parent_relation->IsSlowRelation(); + } + return false; +} + void SG_Node:: DisconnectFromParent( diff --git a/source/gameengine/SceneGraph/SG_Node.h b/source/gameengine/SceneGraph/SG_Node.h index 5cf24de68f3..f86e3046d93 100644 --- a/source/gameengine/SceneGraph/SG_Node.h +++ b/source/gameengine/SceneGraph/SG_Node.h @@ -159,6 +159,14 @@ public: bool IsVertexParent( ) ; + + /** + * Return slow parent status. + */ + + bool + IsSlowParent( + ) ; /** * Update the spatial data of this node. Iterate through diff --git a/source/gameengine/SceneGraph/SG_ParentRelation.h b/source/gameengine/SceneGraph/SG_ParentRelation.h index 9d360d1c274..6507cb98519 100644 --- a/source/gameengine/SceneGraph/SG_ParentRelation.h +++ b/source/gameengine/SceneGraph/SG_ParentRelation.h @@ -99,6 +99,16 @@ public : ) { return false; } + + /** + * Need this to see if we are able to adjust time-offset from the python api + */ + virtual + bool + IsSlowRelation( + ) { + return false; + } protected : /** diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index 18049592977..5ba116e59db 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -87,6 +87,13 @@ SG_Spatial:: delete (m_parent_relation); } + SG_ParentRelation * +SG_Spatial:: +GetParentRelation( +){ + return m_parent_relation; +} + void SG_Spatial:: SetParentRelation( diff --git a/source/gameengine/SceneGraph/SG_Spatial.h b/source/gameengine/SceneGraph/SG_Spatial.h index a70784472a7..28848b0f933 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.h +++ b/source/gameengine/SceneGraph/SG_Spatial.h @@ -83,6 +83,10 @@ public: SetParentRelation( SG_ParentRelation *relation ); + + SG_ParentRelation * + GetParentRelation( + ); /** -- cgit v1.2.3