merge with trunk (15330 -> 15566)
[blender.git] / source / gameengine / Converter / BL_ShapeDeformer.h
index 9bbdde3fb2ced8cb624bd1e99bc792f1c3aa1c34..d3d699b8ddcd33d5924590c13ad78b2ff906e574 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id$
+ * $Id:BL_ShapeDeformer.h 15330 2008-06-23 16:37:51Z theeth $
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
@@ -38,6 +38,7 @@
 #include "BL_DeformableGameObject.h"
 #include <vector>
 
+struct IpoCurve;
 
 class BL_ShapeDeformer : public BL_SkinDeformer  
 {
@@ -57,9 +58,8 @@ public:
                      Object *bmeshobj,
                      BL_SkinMeshObject *mesh)
                                        :       
-                                               BL_SkinDeformer(bmeshobj, mesh),
-                                               m_lastShapeUpdate(-1),
-                                               m_gameobj(gameobj)
+                                               BL_SkinDeformer(gameobj,bmeshobj, mesh),
+                                               m_lastShapeUpdate(-1)
        {
        };
 
@@ -71,9 +71,8 @@ public:
                                        bool release_object,
                                        BL_ArmatureObject* arma = NULL)
                                        :
-                                               BL_SkinDeformer(bmeshobj_old, bmeshobj_new, mesh, release_object, arma),
-                                               m_lastShapeUpdate(-1),
-                                               m_gameobj(gameobj)
+                                               BL_SkinDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, arma),
+                                               m_lastShapeUpdate(-1)
        {
        };
 
@@ -82,10 +81,17 @@ public:
        virtual ~BL_ShapeDeformer();
 
        bool Update (void);
+       bool LoadShapeDrivers(Object* arma);
+       bool ExecuteShapeDrivers(void);
+
+       void ForceUpdate()
+       {
+               m_lastShapeUpdate = -1.0;
+       };
 
 protected:
+       vector<IpoCurve*>                m_shapeDrivers;
        double                                   m_lastShapeUpdate;
-       BL_DeformableGameObject* m_gameobj;
 
 };