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:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-11-06 07:58:10 +0300
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-11-06 07:58:10 +0300
commit38b993f787b1694957f7c9876189f8ef9e346515 (patch)
treecf51058e0dc02eba41d1dd06d7fe3411412a8004 /source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
parentb3395edd2a371de8ee56b3fbdfff4687750acccd (diff)
Speed up the physics engine: hook the SOLID broad phase, so we can either reject the test or request the penetration depth test as necessary. Previously we were doing the penetration depth test, as well as SOLID's intersection test.
Diffstat (limited to 'source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h')
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
index 54574f9fc55..4a69f7e2990 100644
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
+++ b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
@@ -66,6 +66,14 @@ struct SM_MaterialProps {
bool m_fh_normal; ///< Should the object slide off slopes?
};
+class SM_ClientObject
+{
+public:
+ SM_ClientObject() {}
+ virtual ~SM_ClientObject() {}
+
+ virtual bool hasCollisionCallback() = 0;
+};
/**
* SM_Object is an internal part of the Sumo physics engine.
@@ -227,7 +235,6 @@ public:
SM_Object *getDynamicParent() ;
- void beginFrame();
void integrateForces(MT_Scalar timeStep);
void integrateMomentum(MT_Scalar timeSteo);
@@ -255,8 +262,8 @@ public:
);
- void *getClientObject() { return m_client_object; }
- void setClientObject(void *client_object) { m_client_object = client_object; }
+ SM_ClientObject *getClientObject() { return m_client_object; }
+ void setClientObject(SM_ClientObject *client_object) { m_client_object = client_object; }
void relax();
@@ -301,7 +308,7 @@ private:
// as the collision callback now has only information
// on an SM_Object, there must be a way that the SM_Object client
// can identify it's clientdata after a collision
- void *m_client_object;
+ SM_ClientObject *m_client_object;
DT_ShapeHandle m_shape; // Shape for collision detection