diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-12-04 14:27:40 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-12-04 14:27:40 +0300 |
commit | 0b6873a776552bd47c305ee1bc4e629a76da0037 (patch) | |
tree | a64b73ec3bba5adfc5e6cf23722fd93fcdec8a4e /source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h | |
parent | 1dcca75e047a54630c9c005c994fa3b21d6863cd (diff) |
BGE: Add option to return UV coordinates aofthe hit point to KX_GameObject::rayCast(). Details in PyDoc.
Diffstat (limited to 'source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h')
-rw-r--r-- | source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h index 291dac298dc..86e72c70bb7 100644 --- a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h +++ b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h @@ -52,6 +52,8 @@ struct PHY_RayCastResult const RAS_MeshObject* m_meshObject; // !=NULL for mesh object (only for Bullet controllers) int m_polygon; // index of the polygon hit by the ray, // only if m_meshObject != NULL + int m_hitUVOK; // !=0 if UV coordinate in m_hitUV is valid + PHY__Vector2 m_hitUV; // UV coordinates of hit point }; /** @@ -64,6 +66,7 @@ class PHY_IRayCastFilterCallback public: PHY_IPhysicsController* m_ignoreController; bool m_faceNormal; + bool m_faceUV; virtual ~PHY_IRayCastFilterCallback() { @@ -76,9 +79,10 @@ public: virtual void reportHit(PHY_RayCastResult* result) = 0; - PHY_IRayCastFilterCallback(PHY_IPhysicsController* ignoreController, bool faceNormal=false) + PHY_IRayCastFilterCallback(PHY_IPhysicsController* ignoreController, bool faceNormal=false, bool faceUV=false) :m_ignoreController(ignoreController), - m_faceNormal(faceNormal) + m_faceNormal(faceNormal), + m_faceUV(faceUV) { } |