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:
Diffstat (limited to 'source/gameengine/Physics/Sumo/Fuzzics/include')
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h15
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h4
2 files changed, 14 insertions, 5 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
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
index 1c11df66c38..0b429a3c1a4 100644
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
+++ b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
@@ -101,13 +101,15 @@ public:
void requestCollisionCallback(SM_Object &object);
+ void beginFrame();
+ void endFrame();
// Perform an integration step of duration 'timeStep'.
// 'subSampling' is the maximum duration of a substep, i.e.,
// The maximum time interval between two collision checks.
// 'subSampling' can be used to control aliasing effects
// (fast moving objects traversing through walls and such).
- void proceed(MT_Scalar curtime, MT_Scalar ticrate);
+ bool proceed(MT_Scalar curtime, MT_Scalar ticrate);
/**
* Test whether any objects lie on the line defined by from and