Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/GameLogic/SCA_TouchEventManager.h
- This file was moved from source/gameengine/Ketsji/KX_TouchEventManager.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_TouchEventManager.h | /** \file SCA_TouchEventManager.h | ||||
| * \ingroup ketsji | * \ingroup gamelogic | ||||
| */ | */ | ||||
| #ifndef __KX_TOUCHEVENTMANAGER_H__ | #ifndef __SCA_TOUCHEVENTMANAGER_H__ | ||||
| #define __KX_TOUCHEVENTMANAGER_H__ | #define __SCA_TOUCHEVENTMANAGER_H__ | ||||
| #include "SCA_EventManager.h" | #include "SCA_EventManager.h" | ||||
| #include "KX_TouchSensor.h" | #include "SCA_TouchSensor.h" | ||||
| #include "KX_GameObject.h" | #include "KX_GameObject.h" | ||||
| #include <vector> | #include <vector> | ||||
| #include <set> | #include <set> | ||||
| class SCA_ISensor; | class SCA_ISensor; | ||||
| class PHY_IPhysicsEnvironment; | class PHY_IPhysicsEnvironment; | ||||
| class KX_TouchEventManager : public SCA_EventManager | class SCA_TouchEventManager : public SCA_EventManager | ||||
| { | { | ||||
| typedef std::pair<PHY_IPhysicsController*, PHY_IPhysicsController*> NewCollision; | typedef std::pair<PHY_IPhysicsController*, PHY_IPhysicsController*> NewCollision; | ||||
| PHY_IPhysicsEnvironment* m_physEnv; | PHY_IPhysicsEnvironment* m_physEnv; | ||||
| std::set<NewCollision> m_newCollisions; | std::set<NewCollision> m_newCollisions; | ||||
| static bool newCollisionResponse(void *client_data, | static bool newCollisionResponse(void *client_data, | ||||
| Show All 9 Lines | class SCA_TouchEventManager : public SCA_EventManager | ||||
| virtual bool NewHandleCollision(void* obj1,void* obj2, | virtual bool NewHandleCollision(void* obj1,void* obj2, | ||||
| const PHY_CollData * coll_data); | const PHY_CollData * coll_data); | ||||
| public: | public: | ||||
| KX_TouchEventManager(class SCA_LogicManager* logicmgr, | SCA_TouchEventManager(class SCA_LogicManager* logicmgr, | ||||
| PHY_IPhysicsEnvironment* physEnv); | PHY_IPhysicsEnvironment* physEnv); | ||||
| virtual void NextFrame(); | virtual void NextFrame(); | ||||
| virtual void EndFrame(); | virtual void EndFrame(); | ||||
| virtual void RegisterSensor(SCA_ISensor* sensor); | virtual void RegisterSensor(SCA_ISensor* sensor); | ||||
| virtual void RemoveSensor(SCA_ISensor* sensor); | virtual void RemoveSensor(SCA_ISensor* sensor); | ||||
| SCA_LogicManager* GetLogicManager() { return m_logicmgr;} | SCA_LogicManager* GetLogicManager() { return m_logicmgr;} | ||||
| PHY_IPhysicsEnvironment *GetPhysicsEnvironment() { return m_physEnv; } | PHY_IPhysicsEnvironment *GetPhysicsEnvironment() { return m_physEnv; } | ||||
| #ifdef WITH_CXX_GUARDEDALLOC | #ifdef WITH_CXX_GUARDEDALLOC | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_TouchEventManager") | MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_TouchEventManager") | ||||
| #endif | #endif | ||||
| }; | }; | ||||
| #endif /* __KX_TOUCHEVENTMANAGER_H__ */ | #endif /* __SCA_TOUCHEVENTMANAGER_H__ */ | ||||