4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
29 #ifndef __KX_RADAR_SENSOR_H
30 #define __KX_RADAR_SENSOR_H
32 #include "KX_NearSensor.h"
33 #include "MT_Point3.h"
36 * Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used.
38 class KX_RadarSensor : public KX_NearSensor
43 MT_Scalar m_coneradius;
48 MT_Scalar m_coneheight;
52 * The previous position of the origin of the cone.
54 MT_Point3 m_cone_origin;
57 * The previous direction of the cone (origin to bottom plane).
59 MT_Point3 m_cone_target;
63 KX_RadarSensor(SCA_EventManager* eventmgr,
64 KX_GameObject* gameobj,
65 PHY_IPhysicsController* physCtrl,
72 const STR_String& touchedpropname,
73 class KX_Scene* kxscene,
74 PyTypeObject* T = &Type);
76 virtual ~KX_RadarSensor();
77 virtual void SynchronizeTransform();
78 virtual CValue* GetReplica();
80 /* --------------------------------------------------------------------- */
81 /* Python interface ---------------------------------------------------- */
82 /* --------------------------------------------------------------------- */
84 virtual PyObject* _getattr(const char *attr);
86 KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeOrigin);
87 KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeTarget);
88 KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeHeight);
92 #endif //__KX_RADAR_SENSOR_H