Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-12-04 14:27:40 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2009-12-04 14:27:40 +0300
commit0b6873a776552bd47c305ee1bc4e629a76da0037 (patch)
treea64b73ec3bba5adfc5e6cf23722fd93fcdec8a4e /source/gameengine/Ketsji/KX_RayCast.h
parent1dcca75e047a54630c9c005c994fa3b21d6863cd (diff)
BGE: Add option to return UV coordinates aofthe hit point to KX_GameObject::rayCast(). Details in PyDoc.
Diffstat (limited to 'source/gameengine/Ketsji/KX_RayCast.h')
-rw-r--r--source/gameengine/Ketsji/KX_RayCast.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_RayCast.h b/source/gameengine/Ketsji/KX_RayCast.h
index cdafc894f6c..696a8ca78c0 100644
--- a/source/gameengine/Ketsji/KX_RayCast.h
+++ b/source/gameengine/Ketsji/KX_RayCast.h
@@ -32,6 +32,7 @@
#include "PHY_IPhysicsEnvironment.h"
#include "PHY_IPhysicsController.h"
+#include "MT_Vector2.h"
#include "MT_Point3.h"
#include "MT_Vector3.h"
@@ -59,8 +60,10 @@ public:
MT_Vector3 m_hitNormal;
const RAS_MeshObject* m_hitMesh;
int m_hitPolygon;
+ int m_hitUVOK; // !=0 if UV coordinate in m_hitUV is valid
+ MT_Vector2 m_hitUV;
- KX_RayCast(KX_IPhysicsController* ignoreController, bool faceNormal);
+ KX_RayCast(KX_IPhysicsController* ignoreController, bool faceNormal, bool faceUV);
virtual ~KX_RayCast() {}
/**
@@ -102,8 +105,8 @@ template<class T> class KX_RayCast::Callback : public KX_RayCast
T *self;
void *data;
public:
- Callback(T *_self, KX_IPhysicsController* controller=NULL, void *_data = NULL, bool faceNormal=false)
- : KX_RayCast(controller, faceNormal),
+ Callback(T *_self, KX_IPhysicsController* controller=NULL, void *_data = NULL, bool faceNormal=false, bool faceUV=false)
+ : KX_RayCast(controller, faceNormal, faceUV),
self(_self),
data(_data)
{