2 * Sense if other objects are near
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
32 #ifndef KX_NEARSENSOR_H
33 #define KX_NEARSENSOR_H
35 #include "KX_TouchSensor.h"
36 #include "KX_ClientObjectInfo.h"
41 class KX_NearSensor : public KX_TouchSensor
48 KX_ClientObjectInfo* m_client_info;
50 KX_NearSensor(class SCA_EventManager* eventmgr,
51 class KX_GameObject* gameobj,
55 const STR_String& touchedpropname,
56 class KX_Scene* scene,
57 PHY_IPhysicsController* ctrl,
58 PyTypeObject* T=&Type);
61 KX_NearSensor(class SCA_EventManager* eventmgr,
62 class KX_GameObject* gameobj,
66 const STR_String& touchedpropname,
67 class KX_Scene* scene,
68 PyTypeObject* T=&Type);
70 virtual ~KX_NearSensor();
71 virtual void SynchronizeTransform();
72 virtual CValue* GetReplica();
73 virtual bool Evaluate(CValue* event);
75 virtual void ReParent(SCA_IObject* parent);
76 virtual bool NewHandleCollision(void* obj1,void* obj2,
77 const PHY_CollData * coll_data);
78 virtual bool BroadPhaseFilterCollision(void*obj1,void*obj2);
79 virtual void RegisterSumo(KX_TouchEventManager *touchman);
80 virtual void UnregisterSumo(KX_TouchEventManager* touchman);
82 virtual PyObject* _getattr(const char *attr);
86 #endif //KX_NEARSENSOR_H