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>2010-08-29 00:56:54 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2010-08-29 00:56:54 +0400
commitad70072009179fc888572ebc0625a44634052cfe (patch)
tree22f1ca0e57d8a39159bde6a46c5d6512caceab5c /source/gameengine/Ketsji
parent76918e6f90b18c68d83c67ee29dfbc1187a021ae (diff)
BGE patch #22623 applied: new bound type: Capsule.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObject.h4
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp10
2 files changed, 11 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
index 879bcd472c6..ca20aa6b618 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
@@ -53,7 +53,8 @@ typedef enum {
KX_BOUNDCONE,
KX_BOUNDMESH,
KX_BOUNDPOLYTOPE,
- KX_BOUND_DYN_MESH
+ KX_BOUND_DYN_MESH,
+ KX_BOUNDCAPSULE
} KX_BoundBoxClass;
struct KX_BoxBounds
@@ -168,4 +169,3 @@ bool KX_ReInstanceBulletShapeFromMesh(KX_GameObject *gameobj, KX_GameObject *fro
#endif
#endif //KX_CONVERTPHYSICSOBJECTS
-
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
index 44ae032179b..d889c6386cd 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
@@ -184,6 +184,14 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
bm = shapeInfo->CreateBulletShape(ci.m_margin);
break;
}
+ case KX_BOUNDCAPSULE:
+ {
+ shapeInfo->m_radius = objprop->m_boundobject.c.m_radius;
+ shapeInfo->m_height = objprop->m_boundobject.c.m_height;
+ shapeInfo->m_shapeType = PHY_SHAPE_CAPSULE;
+ bm = shapeInfo->CreateBulletShape(ci.m_margin);
+ break;
+ }
case KX_BOUNDMESH:
{
// mesh shapes can be shared, check first if we already have a shape on that mesh
@@ -553,4 +561,4 @@ bool KX_ReInstanceBulletShapeFromMesh(KX_GameObject *gameobj, KX_GameObject *fro
spc->ReplaceControllerShape(bm);
return true;
}
-#endif
+#endif \ No newline at end of file