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>2008-08-21 19:19:54 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-08-21 19:19:54 +0400
commite912ca9331d7f9637664e4588bdb72b0ebe76e5c (patch)
tree1e0c5acf6c732223c9daf4fc3505c9dbd5d5c2e2 /source/gameengine/Physics/common/PHY_DynamicTypes.h
parent4b9f5b2710fd90946dd378d3f004ddfd6e09cfb9 (diff)
BGE bug #17491 fixed: BGE, Dupli instance with different scale, massive slowdown.
The root cause of this bug is the fact that Bullet shapes are shared between duplicated game objects. As the physics object scale is stored in the shape, all duplicas must have the same scale otherwise the physics representation is incorrect. This fix introduces a mechanism to duplicate shapes at runtime so that Bullet shapes are not shared anymore. The drawback is an increased memory consuption. A reference count mechanism will be introduced in a later revision to keep Bullet shape shared between duplicas that have the same scale.
Diffstat (limited to 'source/gameengine/Physics/common/PHY_DynamicTypes.h')
-rw-r--r--source/gameengine/Physics/common/PHY_DynamicTypes.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/gameengine/Physics/common/PHY_DynamicTypes.h b/source/gameengine/Physics/common/PHY_DynamicTypes.h
index c289b9d8bcb..3b3e42c38d2 100644
--- a/source/gameengine/Physics/common/PHY_DynamicTypes.h
+++ b/source/gameengine/Physics/common/PHY_DynamicTypes.h
@@ -87,6 +87,18 @@ typedef enum PHY_ConstraintType {
} PHY_ConstraintType;
+typedef enum PHY_ShapeType {
+ PHY_SHAPE_NONE,
+ PHY_SHAPE_BOX,
+ PHY_SHAPE_SPHERE,
+ PHY_SHAPE_CYLINDER,
+ PHY_SHAPE_CONE,
+ PHY_SHAPE_MESH,
+ PHY_SHAPE_POLYTOPE,
+ PHY_SHAPE_COMPOUND
+} PHY_ShapeType;
+
+
typedef float PHY_Vector3[3];
#endif //__PHY_DYNAMIC_TYPES