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:
authorMitchell Stokes <mogurijin@gmail.com>2011-05-28 11:15:27 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-05-28 11:15:27 +0400
commit07dca944766e702453730fe1a55605dab9380c6e (patch)
treec0ac8ab439ef1cd06154353f0d7fa3aa71862ecb /source/gameengine/SceneGraph
parentbd5f78d1a0bf4e04800395952e9a26ba868cc31a (diff)
BGE Animation:
* Adding IPOs to BL_Action * Adding a "speed" option to adjust the playback speed by some factor
Diffstat (limited to 'source/gameengine/SceneGraph')
-rw-r--r--source/gameengine/SceneGraph/SG_IObject.cpp12
-rw-r--r--source/gameengine/SceneGraph/SG_IObject.h10
2 files changed, 22 insertions, 0 deletions
diff --git a/source/gameengine/SceneGraph/SG_IObject.cpp b/source/gameengine/SceneGraph/SG_IObject.cpp
index 3064e6662b9..b22d210984d 100644
--- a/source/gameengine/SceneGraph/SG_IObject.cpp
+++ b/source/gameengine/SceneGraph/SG_IObject.cpp
@@ -34,6 +34,8 @@
#include "SG_IObject.h"
#include "SG_Controller.h"
+#include <algorithm>
+
SG_Stage gSG_Stage = SG_STAGE_UNKNOWN;
SG_IObject::
@@ -71,6 +73,16 @@ AddSGController(
void
SG_IObject::
+RemoveSGController(
+ SG_Controller* cont
+) {
+ SGControllerList::iterator contit;
+
+ m_SGcontrollers.erase(std::remove(m_SGcontrollers.begin(), m_SGcontrollers.end(), cont));
+}
+
+ void
+SG_IObject::
RemoveAllControllers(
) {
m_SGcontrollers.clear();
diff --git a/source/gameengine/SceneGraph/SG_IObject.h b/source/gameengine/SceneGraph/SG_IObject.h
index 26e317bdcd9..e709699c08a 100644
--- a/source/gameengine/SceneGraph/SG_IObject.h
+++ b/source/gameengine/SceneGraph/SG_IObject.h
@@ -180,6 +180,16 @@ public:
SG_Controller* cont
);
+ /**
+ * Remove a pointer to a controller from this node.
+ * This does not delete the controller itself! Be careful to
+ * avoid memory leaks.
+ */
+ void
+ RemoveSGController(
+ SG_Controller* cont
+ );
+
/**
* Clear the array of pointers to controllers associated with
* this node. This does not delete the controllers themselves!