From 2bece8dcb5104bc95149b0c40723f1dc855d6b29 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Wed, 18 Jun 2008 06:46:49 +0000 Subject: BGE Patch: Add Shape Action support and update MSCV_7 project file for glew. Shape Action are now supported in the BGE. A new type of actuator "Shape Action" is available on mesh objects. It can be combined with Action actuator on parent armature. Only relative keys are supported. All the usual action options are available: type, blending, priority, Python API. Only actions with shape channels should be specified of course, otherwise the actuator has no effect. Shape action will still work after a mesh replacement provided that the new mesh has compatible shape keys. --- source/gameengine/Rasterizer/RAS_Deformer.h | 2 +- source/gameengine/Rasterizer/RAS_MeshObject.cpp | 5 +++-- source/gameengine/Rasterizer/RAS_MeshObject.h | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'source/gameengine/Rasterizer') diff --git a/source/gameengine/Rasterizer/RAS_Deformer.h b/source/gameengine/Rasterizer/RAS_Deformer.h index bea68e203a9..4e8484ab880 100644 --- a/source/gameengine/Rasterizer/RAS_Deformer.h +++ b/source/gameengine/Rasterizer/RAS_Deformer.h @@ -43,7 +43,7 @@ public: virtual ~RAS_Deformer(){}; virtual void Relink(GEN_Map*map)=0; virtual bool Apply(class RAS_IPolyMaterial *polymat)=0; - virtual void Update(void)=0; + virtual bool Update(void)=0; virtual RAS_Deformer *GetReplica()=0; protected: class RAS_MeshObject *m_pMesh; diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index db74110ceea..d7ab88a6b06 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -63,12 +63,13 @@ KX_ArrayOptimizer::~KX_ArrayOptimizer() -RAS_MeshObject::RAS_MeshObject(int lightlayer) +RAS_MeshObject::RAS_MeshObject(Mesh* mesh, int lightlayer) : m_bModified(true), m_lightlayer(lightlayer), m_zsort(false), m_MeshMod(true), - m_class(0) + m_class(0), + m_mesh(mesh) { } diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h index d8e7a3391aa..d9aa133efb2 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.h +++ b/source/gameengine/Rasterizer/RAS_MeshObject.h @@ -43,6 +43,7 @@ #include "GEN_HashedPtr.h" +struct Mesh; /** * This class holds an array of vertices and indicies. */ @@ -144,9 +145,10 @@ protected: GEN_Map m_matVertexArrayS; RAS_MaterialBucket::Set m_materials; + Mesh* m_mesh; public: // for now, meshes need to be in a certain layer (to avoid sorting on lights in realtime) - RAS_MeshObject(int lightlayer); + RAS_MeshObject(Mesh* mesh, int lightlayer); virtual ~RAS_MeshObject(); vector m_sortedMaterials; @@ -258,6 +260,7 @@ public: bool MeshModified(); void SetMeshModified(bool v){m_MeshMod = v;} + Mesh* GetMesh() { return m_mesh; } }; -- cgit v1.2.3