~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * Sense if other objects are near
3
3
 *
4
 
 * $Id: KX_NearSensor.h 22082 2009-07-31 09:05:13Z campbellbarton $
 
4
 * $Id: KX_NearSensor.h 32788 2010-10-31 04:11:39Z campbellbarton $
5
5
 *
6
6
 * ***** BEGIN GPL LICENSE BLOCK *****
7
7
 *
17
17
 *
18
18
 * You should have received a copy of the GNU General Public License
19
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.
 
20
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
21
 *
22
22
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23
23
 * All rights reserved.
53
53
                        float resetmargin,
54
54
                        bool bFindMaterial,
55
55
                        const STR_String& touchedpropname,
56
 
                         PHY_IPhysicsController*        ctrl,
57
 
                        PyTypeObject* T=&Type);
 
56
                         PHY_IPhysicsController*        ctrl);
58
57
/*
59
58
public:
60
59
        KX_NearSensor(class SCA_EventManager* eventmgr,
63
62
                        double resetmargin,
64
63
                        bool bFindMaterial,
65
64
                        const STR_String& touchedpropname,
66
 
                        class KX_Scene* scene,
67
 
                        PyTypeObject* T=&Type);
 
65
                        class KX_Scene* scene);
68
66
*/
69
67
        virtual ~KX_NearSensor(); 
70
68
        virtual void SynchronizeTransform();
71
69
        virtual CValue* GetReplica();
72
70
        virtual void ProcessReplica();
 
71
        virtual void SetPhysCtrlRadius();
73
72
        virtual bool Evaluate();
74
73
 
75
74
        virtual void ReParent(SCA_IObject* parent);
79
78
        virtual bool    BroadPhaseSensorFilterCollision(void*obj1,void*obj2) { return false; };
80
79
        virtual sensortype GetSensorType() { return ST_NEAR; }
81
80
 
 
81
#ifdef WITH_PYTHON
 
82
 
82
83
        /* --------------------------------------------------------------------- */
83
84
        /* Python interface ---------------------------------------------------- */
84
85
        /* --------------------------------------------------------------------- */
85
 
        virtual PyObject* py_getattro(PyObject *attr);
86
 
        virtual PyObject* py_getattro_dict();
87
 
        virtual int py_setattro(PyObject *attr, PyObject* value);
88
86
 
89
87
        //No methods
90
88
 
96
94
                if (sensor->m_Margin > sensor->m_ResetMargin)
97
95
                        sensor->m_ResetMargin = sensor->m_Margin;
98
96
 
 
97
                sensor->SetPhysCtrlRadius();
 
98
                        
99
99
                return 0;
100
100
        }
101
101
 
 
102
#endif // WITH_PYTHON
 
103
 
102
104
};
103
105
 
104
106
#endif //KX_NEARSENSOR_H