~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/Ketsji/KX_TouchEventManager.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: KX_TouchEventManager.h,v 1.6 2004/03/22 22:01:53 jesterking Exp $
 
2
 * $Id: KX_TouchEventManager.h,v 1.11 2005/03/25 10:33:37 kester Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
32
32
#ifndef __KX_TOUCHEVENTMANAGER
33
33
#define __KX_TOUCHEVENTMANAGER
34
34
 
 
35
 
35
36
#include "SCA_EventManager.h"
36
37
#include "KX_TouchSensor.h"
37
38
#include "KX_GameObject.h"
38
39
 
39
40
#include <vector>
 
41
#include <set>
 
42
 
 
43
class SCA_ISensor;
 
44
class PHY_IPhysicsEnvironment;
40
45
 
41
46
class KX_TouchEventManager : public SCA_EventManager
42
47
{
 
48
        typedef std::pair<PHY_IPhysicsController*, PHY_IPhysicsController*> NewCollision;
43
49
        class SCA_LogicManager* m_logicmgr;
44
 
        SM_Scene *m_scene;
45
 
 
46
 
        static DT_Bool KX_TouchEventManager::collisionResponse(void *client_data, 
47
 
                                                        void *object1,
48
 
                                                        void *object2,
49
 
                                                        const DT_CollData *coll_data);
50
 
        
51
 
        virtual DT_Bool HandleCollision(void* obj1,void* obj2,
52
 
                                                 const DT_CollData * coll_data); 
53
 
        
 
50
        PHY_IPhysicsEnvironment*        m_physEnv;
 
51
        
 
52
        std::set<NewCollision> m_newCollisions;
 
53
        
 
54
        
 
55
        static bool newCollisionResponse(void *client_data, 
 
56
                                                void *object1,
 
57
                                                void *object2,
 
58
                                                const PHY_CollData *coll_data);
 
59
        
 
60
        virtual bool    NewHandleCollision(void* obj1,void* obj2,
 
61
                                                const PHY_CollData * coll_data); 
 
62
 
 
63
 
 
64
 
 
65
 
54
66
 
55
67
public:
56
68
        KX_TouchEventManager(class SCA_LogicManager* logicmgr,  
57
 
                SM_Scene *scene);
58
 
        virtual void NextFrame(double curtime,double deltatime);
 
69
                PHY_IPhysicsEnvironment* physEnv);
 
70
        virtual void NextFrame();
59
71
        virtual void    EndFrame();
60
72
        virtual void    RemoveSensor(class SCA_ISensor* sensor);
61
73
        virtual void RegisterSensor(SCA_ISensor* sensor);
62
74
        SCA_LogicManager* GetLogicManager() { return m_logicmgr;}
63
 
        SM_Scene *GetSumoScene() { return m_scene; }
 
75
        PHY_IPhysicsEnvironment *GetPhysicsEnvironment() { return m_physEnv; }
 
76
 
64
77
};
65
78
 
66
79
#endif //__KX_TOUCHEVENTMANAGER