Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00032 #ifndef __KX_RADAR_SENSOR_H 00033 #define __KX_RADAR_SENSOR_H 00034 00035 #include "KX_NearSensor.h" 00036 #include "MT_Point3.h" 00037 00041 class KX_RadarSensor : public KX_NearSensor 00042 { 00043 protected: 00044 Py_Header 00045 00046 float m_coneradius; 00047 00051 float m_coneheight; 00052 int m_axis; 00053 00057 float m_cone_origin[3]; 00058 00062 float m_cone_target[3]; 00063 00064 public: 00065 00066 KX_RadarSensor(SCA_EventManager* eventmgr, 00067 KX_GameObject* gameobj, 00068 PHY_IPhysicsController* physCtrl, 00069 double coneradius, 00070 double coneheight, 00071 int axis, 00072 double margin, 00073 double resetmargin, 00074 bool bFindMaterial, 00075 const STR_String& touchedpropname); 00076 KX_RadarSensor(); 00077 virtual ~KX_RadarSensor(); 00078 virtual void SynchronizeTransform(); 00079 virtual CValue* GetReplica(); 00080 00081 /* --------------------------------------------------------------------- */ 00082 /* Python interface ---------------------------------------------------- */ 00083 /* --------------------------------------------------------------------- */ 00084 enum RadarAxis { 00085 KX_RADAR_AXIS_POS_X = 0, 00086 KX_RADAR_AXIS_POS_Y, 00087 KX_RADAR_AXIS_POS_Z, 00088 KX_RADAR_AXIS_NEG_X, 00089 KX_RADAR_AXIS_NEG_Y, 00090 KX_RADAR_AXIS_NEG_Z 00091 }; 00092 00093 /* python */ 00094 virtual sensortype GetSensorType() { return ST_RADAR; } 00095 00096 }; 00097 00098 #endif //__KX_RADAR_SENSOR_H 00099