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-07-07 07:53:24 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-07-07 07:53:24 +0400
commit0eacdc94ba7bf51b48c977c3d0fc07ef4f70e384 (patch)
tree4b5dd400655efbfcfeb755c91c0a8ccd7d96bad3 /source/gameengine/Ketsji
parentd00a3c8ddf4f722ae829bbfa025fb09446a8fba3 (diff)
BGE Animations: Removing unused code and adding some more comments.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/BL_Action.cpp4
-rw-r--r--source/gameengine/Ketsji/BL_Action.h17
-rw-r--r--source/gameengine/Ketsji/BL_ActionManager.cpp11
-rw-r--r--source/gameengine/Ketsji/BL_ActionManager.h39
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h2
5 files changed, 58 insertions, 15 deletions
diff --git a/source/gameengine/Ketsji/BL_Action.cpp b/source/gameengine/Ketsji/BL_Action.cpp
index f1b53fc4151..8ed6a33696a 100644
--- a/source/gameengine/Ketsji/BL_Action.cpp
+++ b/source/gameengine/Ketsji/BL_Action.cpp
@@ -22,6 +22,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file BL_Action.cpp
+ * \ingroup ketsji
+ */
+
#include <cstdlib>
#include "BL_Action.h"
diff --git a/source/gameengine/Ketsji/BL_Action.h b/source/gameengine/Ketsji/BL_Action.h
index f7c5a811721..14312e158c0 100644
--- a/source/gameengine/Ketsji/BL_Action.h
+++ b/source/gameengine/Ketsji/BL_Action.h
@@ -21,6 +21,11 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+/** \file BL_Action.h
+ * \ingroup ketsji
+ */
+
#ifndef __BL_ACTION
#define __BL_ACTION
@@ -75,6 +80,9 @@ public:
BL_Action(class KX_GameObject* gameobj);
~BL_Action();
+ /**
+ * Play an action
+ */
bool Play(const char* name,
float start,
float end,
@@ -84,8 +92,17 @@ public:
float layer_weight,
short ipo_flags,
float playback_speed);
+ /**
+ * Stop playing the action
+ */
void Stop();
+ /**
+ * Whether or not the action is still playing
+ */
bool IsDone();
+ /**
+ * Update the action's frame, etc.
+ */
void Update(float curtime);
// Accessors
diff --git a/source/gameengine/Ketsji/BL_ActionManager.cpp b/source/gameengine/Ketsji/BL_ActionManager.cpp
index c3b4dc5d4db..0586c515c65 100644
--- a/source/gameengine/Ketsji/BL_ActionManager.cpp
+++ b/source/gameengine/Ketsji/BL_ActionManager.cpp
@@ -17,16 +17,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
+ * Contributor(s): Mitchell Stokes.
*
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file BL_ActionManager.cpp
+ * \ingroup ketsji
+ */
+
#include "BL_ActionManager.h"
BL_ActionManager::BL_ActionManager(class KX_GameObject *obj)
diff --git a/source/gameengine/Ketsji/BL_ActionManager.h b/source/gameengine/Ketsji/BL_ActionManager.h
index c527c7bbd3a..3818f643b1c 100644
--- a/source/gameengine/Ketsji/BL_ActionManager.h
+++ b/source/gameengine/Ketsji/BL_ActionManager.h
@@ -17,15 +17,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
+ * Contributor(s): Mitchell Stokes.
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+/** \file BL_ActionManager.cpp
+ * \ingroup ketsji
+ */
+
#ifndef __BL_ACTIONMANAGER
#define __BL_ACTIONMANAGER
@@ -33,6 +33,9 @@
#define MAX_ACTION_LAYERS 4
+/**
+ * BL_ActionManager is responsible for handling a KX_GameObject's actions.
+ */
class BL_ActionManager
{
private:
@@ -52,14 +55,34 @@ public:
float layer_weight=0.f,
short ipo_flags=0,
float playback_speed=1.f);
-
+ /**
+ * Gets the current frame of an action
+ */
float GetActionFrame(short layer);
- void SetActionFrame(short layer, float frame);
+ /**
+ * Sets the current frame of an action
+ */
+ void SetActionFrame(short layer, float frame);
+
+ /**
+ * Gets the currently running action on the given layer
+ */
struct bAction *GetCurrentAction(short layer);
+ /**
+ * Stop playing the action on the given layer
+ */
void StopAction(short layer);
+
+ /**
+ * Check if an action has finished playing
+ */
bool IsActionDone(short layer);
+
+ /**
+ * Update any running actions
+ */
void Update(float);
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index 6e22dc5fbc3..7e052e6d057 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -239,7 +239,7 @@ public:
bAction *GetCurrentAction(short layer);
/**
- * Remove an action from the object's action manager
+ * Stop playing the action on the given layer
*/
void StopAction(short layer);