Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/GameLogic/SCA_ReplaceMeshActuator.h
- This file was moved from source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h.
| Show All 19 Lines | |||||
| * | * | ||||
| * The Original Code is: all of this file. | * The Original Code is: all of this file. | ||||
| * | * | ||||
| * Contributor(s): none yet. | * Contributor(s): none yet. | ||||
| * | * | ||||
| * ***** END GPL LICENSE BLOCK ***** | * ***** END GPL LICENSE BLOCK ***** | ||||
| */ | */ | ||||
| /** \file KX_SCA_ReplaceMeshActuator.h | /** \file SCA_ReplaceMeshActuator.h | ||||
| * \ingroup ketsji | * \ingroup gamelogic | ||||
| * \brief Add object to the game world on action of this actuator | * \brief Add object to the game world on action of this actuator | ||||
| * \attention Previously existed as: source/gameengine/GameLogic/SCA_ReplaceMeshActuator.h | * \attention Previously existed as: source/gameengine/GameLogic/SCA_ReplaceMeshActuator.h | ||||
| * Please look here for revision history. | * Please look here for revision history. | ||||
| */ | */ | ||||
| #ifndef __KX_SCA_REPLACEMESHACTUATOR_H__ | #ifndef __SCA_REPLACEMESHACTUATOR_H__ | ||||
| #define __KX_SCA_REPLACEMESHACTUATOR_H__ | #define __SCA_REPLACEMESHACTUATOR_H__ | ||||
| #include "SCA_IActuator.h" | #include "SCA_IActuator.h" | ||||
| #include "SCA_PropertyActuator.h" | #include "SCA_PropertyActuator.h" | ||||
| #include "SCA_LogicManager.h" | #include "SCA_LogicManager.h" | ||||
| #include "SCA_IScene.h" | #include "SCA_IScene.h" | ||||
| #include "RAS_MeshObject.h" | #include "RAS_MeshObject.h" | ||||
| class KX_SCA_ReplaceMeshActuator : public SCA_IActuator | class SCA_ReplaceMeshActuator : public SCA_IActuator | ||||
| { | { | ||||
| Py_Header | Py_Header | ||||
| // mesh reference (mesh to replace) | // mesh reference (mesh to replace) | ||||
| RAS_MeshObject* m_mesh; | RAS_MeshObject* m_mesh; | ||||
| SCA_IScene* m_scene; | SCA_IScene* m_scene; | ||||
| bool m_use_gfx; | bool m_use_gfx; | ||||
| bool m_use_phys; | bool m_use_phys; | ||||
| public: | public: | ||||
| KX_SCA_ReplaceMeshActuator( | SCA_ReplaceMeshActuator( | ||||
| SCA_IObject* gameobj, | SCA_IObject* gameobj, | ||||
| RAS_MeshObject *mesh, | RAS_MeshObject *mesh, | ||||
| SCA_IScene* scene, | SCA_IScene* scene, | ||||
| bool use_gfx, | bool use_gfx, | ||||
| bool use_phys | bool use_phys | ||||
| ); | ); | ||||
| ~KX_SCA_ReplaceMeshActuator( | ~SCA_ReplaceMeshActuator(); | ||||
| ); | |||||
| CValue* | CValue* GetReplica(); | ||||
| GetReplica( | |||||
| ); | |||||
| virtual bool | virtual bool Update(); | ||||
| Update(); | |||||
| void InstantReplaceMesh(); | void InstantReplaceMesh(); | ||||
| #ifdef WITH_PYTHON | #ifdef WITH_PYTHON | ||||
| /* --------------------------------------------------------------------- */ | /* --------------------------------------------------------------------- */ | ||||
| /* Python interface ---------------------------------------------------- */ | /* Python interface ---------------------------------------------------- */ | ||||
| /* --------------------------------------------------------------------- */ | /* --------------------------------------------------------------------- */ | ||||
| virtual void Replace_IScene(SCA_IScene *val) | virtual void Replace_IScene(SCA_IScene *val) | ||||
| { | { | ||||
| m_scene= val; | m_scene= val; | ||||
| }; | } | ||||
| static PyObject *pyattr_get_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); | static PyObject *pyattr_get_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); | ||||
| static int pyattr_set_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | static int pyattr_set_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | ||||
| KX_PYMETHOD_DOC(KX_SCA_ReplaceMeshActuator,instantReplaceMesh); | KX_PYMETHOD_DOC(SCA_ReplaceMeshActuator,instantReplaceMesh); | ||||
| #endif /* WITH_PYTHON */ | #endif /* WITH_PYTHON */ | ||||
| }; | }; | ||||
| #endif /* __KX_SCA_REPLACEMESHACTUATOR_H__ */ | #endif /* __SCA_REPLACEMESHACTUATOR_H__ */ | ||||