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/Bullet/CcdPhysicsController.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/Bullet/CcdPhysicsController.h')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h index dcb0af62cf9..637007e2857 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h @@ -52,12 +52,16 @@ class btCollisionShape; #define CCD_BSB_COL_VF_SS 16 /* Vertex/Face based soft vs soft */ - // Shape contructor // It contains all the information needed to create a simple bullet shape at runtime class CcdShapeConstructionInfo { public: + struct UVco + { + float uv[2]; + }; + static CcdShapeConstructionInfo* FindMesh(class RAS_MeshObject* mesh, struct DerivedMesh* dm, bool polytope, bool gimpact); CcdShapeConstructionInfo() : @@ -103,7 +107,7 @@ public: btTriangleMeshShape* GetMeshShape(void) { - return m_unscaledShape; + return (m_unscaledShape); } CcdShapeConstructionInfo* GetChildShape(int i) { @@ -174,6 +178,9 @@ public: std::vector<int> m_triFaceArray; // Contains an array of triplets of face indicies // quads turn into 2 tris + std::vector<UVco> m_triFaceUVcoArray; // Contains an array of pair of UV coordinate for each vertex of faces + // quads turn into 2 tris + void setVertexWeldingThreshold1(float threshold) { m_weldingThreshold1 = threshold*threshold; |