Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / gameengine / Ketsji / KX_RadarSensor.cpp
index eb127be804433aa2cafe8c0744b09b2f6a718686..d020a2544d2ee0c79237642ff86ddae3d7949c6d 100644 (file)
@@ -176,7 +176,51 @@ void KX_RadarSensor::SynchronizeTransform()
 /* Python Functions                                                                                                                     */
 /* ------------------------------------------------------------------------- */
 
 /* Python Functions                                                                                                                     */
 /* ------------------------------------------------------------------------- */
 
-/* none */
+//Deprecated ----->
+/* getConeOrigin */
+const char KX_RadarSensor::GetConeOrigin_doc[] = 
+"getConeOrigin()\n"
+"\tReturns the origin of the cone with which to test. The origin\n"
+"\tis in the middle of the cone.";
+PyObject* KX_RadarSensor::PyGetConeOrigin() {
+       ShowDeprecationWarning("getConeOrigin()", "the coneOrigin property");
+
+       PyObject *retVal = PyList_New(3);
+       
+       PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_cone_origin[0]));
+       PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_cone_origin[1]));
+       PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_cone_origin[2]));
+       
+       return retVal;
+}
+
+/* getConeOrigin */
+const char KX_RadarSensor::GetConeTarget_doc[] = 
+"getConeTarget()\n"
+"\tReturns the center of the bottom face of the cone with which to test.\n";
+PyObject* KX_RadarSensor::PyGetConeTarget() {
+       ShowDeprecationWarning("getConeTarget()", "the coneTarget property");
+
+       PyObject *retVal = PyList_New(3);
+       
+       PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_cone_target[0]));
+       PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_cone_target[1]));
+       PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_cone_target[2]));
+       
+       return retVal;
+}
+
+/* getConeHeight */
+const char KX_RadarSensor::GetConeHeight_doc[] = 
+"getConeHeight()\n"
+"\tReturns the height of the cone with which to test.\n";
+PyObject* KX_RadarSensor::PyGetConeHeight() {
+                                                                                         
+       ShowDeprecationWarning("getConeHeight()", "the distance property");
+
+       return PyFloat_FromDouble(m_coneheight);
+}
+//<----- Deprecated
 
 /* ------------------------------------------------------------------------- */
 /* Python Integration Hooks                                                  */
 
 /* ------------------------------------------------------------------------- */
 /* Python Integration Hooks                                                  */
@@ -204,6 +248,14 @@ PyTypeObject KX_RadarSensor::Type = {
 };
 
 PyMethodDef KX_RadarSensor::Methods[] = {
 };
 
 PyMethodDef KX_RadarSensor::Methods[] = {
+       //Deprecated ----->
+       {"getConeOrigin", (PyCFunction) KX_RadarSensor::sPyGetConeOrigin, 
+        METH_VARARGS, (const char *)GetConeOrigin_doc},
+       {"getConeTarget", (PyCFunction) KX_RadarSensor::sPyGetConeTarget, 
+        METH_VARARGS, (const char *)GetConeTarget_doc},
+       {"getConeHeight", (PyCFunction) KX_RadarSensor::sPyGetConeHeight, 
+        METH_VARARGS, (const char *)GetConeHeight_doc},
+        //<-----
        {NULL} //Sentinel
 };
 
        {NULL} //Sentinel
 };