00001 // 00002 // Add object to the game world on action of this actuator 00003 // 00004 // Version: $Id: SCA_ReplaceMeshActuator_h-source.html,v 1.1 2001/02/01 12:25:16 coockie Exp $ 00005 // 00006 00007 #ifndef __KX_REPLACEMESHACTUATOR 00008 #define __KX_REPLACEMESHACTUATOR 00009 00010 #include "SCA_IActuator.h" 00011 #include "SCA_PropertyActuator.h" 00012 #include "SCA_LogicManager.h" 00013 00014 class SCA_ReplaceMeshActuator : public SCA_IActuator 00015 { 00016 Py_Header; 00017 00018 // mesh reference (mesh to replace) 00019 class RAS_MeshObject* m_mesh; 00020 class SCA_IScene* m_scene; 00021 // 00022 // logic has no access to rasterizer, need to discuss about this 00023 //RAS_MeshObject *m_replacementMesh; 00024 public: 00025 SCA_ReplaceMeshActuator(SCA_IObject* gameobj, 00026 class RAS_MeshObject *mesh, 00027 class SCA_IScene* scene, 00028 PyTypeObject* T=&Type); 00029 virtual ~SCA_ReplaceMeshActuator(); 00030 virtual CValue* GetReplica() { 00031 SCA_ReplaceMeshActuator* replica = new SCA_ReplaceMeshActuator(*this); 00032 replica->ProcessReplica(); 00033 // this will copy properties and so on... 00034 CValue::AddDataToReplica(replica); 00035 return replica; 00036 }; 00037 00038 virtual bool Update(double curtime,double deltatime); 00039 00040 virtual PyObject* _getattr(char *attr); 00041 00042 00043 /* 1. setMesh */ 00044 KX_PYMETHOD_DOC(SCA_ReplaceMeshActuator,SetMesh); 00045 /* 2. getMesh */ 00046 /* KX_PYMETHOD_DOC(SCA_ReplaceMeshActuator,Getmesh); */ 00047 00048 }; /* end of class SCA_ReplaceMeshActuator : public KX_EditObjectActuator */ 00049 00050 #endif