diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
commit | 874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch) | |
tree | 5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/Ketsji/KX_RaySensor.h | |
parent | 7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff) | |
parent | c5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/Ketsji/KX_RaySensor.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_RaySensor.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h index 09d8bc1369a..a5d7d15c60c 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.h +++ b/source/gameengine/Ketsji/KX_RaySensor.h @@ -44,15 +44,15 @@ class KX_RaySensor : public SCA_ISensor STR_String m_propertyname; bool m_bFindMaterial; bool m_bXRay; - double m_distance; + float m_distance; class KX_Scene* m_scene; bool m_bTriggered; int m_axis; bool m_rayHit; - MT_Point3 m_hitPosition; + float m_hitPosition[3]; SCA_IObject* m_hitObject; - MT_Vector3 m_hitNormal; - MT_Vector3 m_rayDirection; + float m_hitNormal[3]; + float m_rayDirection[3]; public: KX_RaySensor(class SCA_EventManager* eventmgr, @@ -73,13 +73,31 @@ public: bool RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void * const data); bool NeedRayCast(KX_ClientObjectInfo* client); + + + //Python Interface + enum RayAxis { + KX_RAY_AXIS_POS_Y = 0, + KX_RAY_AXIS_POS_X, + KX_RAY_AXIS_POS_Z, + KX_RAY_AXIS_NEG_X, + KX_RAY_AXIS_NEG_Y, + KX_RAY_AXIS_NEG_Z + }; + + + virtual PyObject* py_getattro(PyObject *attr); + virtual int py_setattro(PyObject *attr, PyObject *value); + // Deprecated -----> KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitObject); KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitPosition); KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitNormal); KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetRayDirection); + // <----- - virtual PyObject* _getattr(const char *attr); + /* Attributes */ + static PyObject* pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); }; |