4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
30 #ifndef BL_SHAPEDEFORMER
31 #define BL_SHAPEDEFORMER
33 #if defined(WIN32) && !defined(FREE_WINDOWS)
34 #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
37 #include "BL_SkinDeformer.h"
38 #include "BL_DeformableGameObject.h"
43 class BL_ShapeDeformer : public BL_SkinDeformer
46 BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
50 BL_SkinDeformer(gameobj,bmeshobj, mesh),
55 /* this second constructor is needed for making a mesh deformable on the fly. */
56 BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
57 struct Object *bmeshobj_old,
58 struct Object *bmeshobj_new,
59 class RAS_MeshObject *mesh,
62 BL_ArmatureObject* arma = NULL)
64 BL_SkinDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, recalc_normal, arma),
69 virtual RAS_Deformer *GetReplica();
70 virtual void ProcessReplica();
71 virtual ~BL_ShapeDeformer();
74 bool LoadShapeDrivers(Object* arma);
75 bool ExecuteShapeDrivers(void);
79 m_lastShapeUpdate = -1.0;
83 vector<IpoCurve*> m_shapeDrivers;
84 double m_lastShapeUpdate;
87 #ifdef WITH_CXX_GUARDEDALLOC
89 void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ShapeDeformer"); }
90 void operator delete( void *mem ) { MEM_freeN(mem); }