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_MotionState.h1
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h39
-rw-r--r--source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h3
3 files changed, 7 insertions, 36 deletions
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h
index 08e29265d0c..b0e0717cf8c 100644
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h
+++ b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h
@@ -61,7 +61,6 @@ public:
void integrateBackward(MT_Scalar timeStep, const MT_Vector3 &velocity, const MT_Quaternion& ang_vel);
void integrateForward(MT_Scalar timeStep, const SM_MotionState &prev_state);
- void lerp(const SM_MotionState &prev, const SM_MotionState &next);
void lerp(MT_Scalar t, const SM_MotionState &other);
virtual MT_Transform getTransform() const {
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
index 07eb5a7637f..b37e1a5466b 100644
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
+++ b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h
@@ -81,8 +81,7 @@ public:
* It encapsulates an object in the physics scene, and is responsible
* for calculating the collision response of objects.
*/
-class SM_Object
-{
+class SM_Object : public SM_MotionState {
public:
SM_Object() ;
SM_Object(
@@ -267,29 +266,7 @@ public:
void relax();
- SM_MotionState &getCurrentFrame();
- SM_MotionState &getPreviousFrame();
- SM_MotionState &getNextFrame();
-
- const SM_MotionState &getCurrentFrame() const;
- const SM_MotionState &getPreviousFrame() const;
- const SM_MotionState &getNextFrame() const;
-
- // Motion state functions
- const MT_Point3& getPosition() const;
- const MT_Quaternion& getOrientation() const;
- const MT_Vector3& getLinearVelocity() const;
- const MT_Vector3& getAngularVelocity() const;
-
- MT_Scalar getTime() const;
-
- void setTime(MT_Scalar time);
-
- void interpolate(MT_Scalar timeStep);
- void endFrame();
-
private:
- friend class Contact;
// Tweak parameters
static MT_Scalar ImpulseThreshold;
@@ -347,12 +324,14 @@ private:
MT_Vector3 m_reaction_impulse; // The accumulated impulse resulting from collisions
MT_Vector3 m_reaction_force; // The reaction force derived from the reaction impulse
+ unsigned int m_kinematic : 1; // Have I been displaced (translated, rotated, scaled) in this frame?
+ unsigned int m_prev_kinematic : 1; // Have I been displaced (translated, rotated, scaled) in the previous frame?
+ unsigned int m_is_rigid_body : 1; // Should friction give me a change in angular momentum?
+
MT_Vector3 m_lin_mom; // Linear momentum (linear velocity times mass)
MT_Vector3 m_ang_mom; // Angular momentum (angualr velocity times inertia)
MT_Vector3 m_force; // Force on center of mass (afffects linear momentum)
- MT_Vector3 m_torque; // Torque around center of mass (affects angular momentum)
-
- SM_MotionState m_frames[3];
+ MT_Vector3 m_torque; // Torque around center of mass (affects angualr momentum)
MT_Vector3 m_error; // Error in position:- amount object must be moved to prevent intersection with scene
@@ -376,12 +355,6 @@ private:
MT_Scalar m_inv_mass; // 1/mass
MT_Vector3 m_inv_inertia; // [1/inertia_x, 1/inertia_y, 1/inertia_z]
MT_Matrix3x3 m_inv_inertia_tensor; // Inverse Inertia Tensor
-
- bool m_kinematic; // Have I been displaced (translated, rotated, scaled) in this frame?
- bool m_prev_kinematic; // Have I been displaced (translated, rotated, scaled) in the previous frame?
- bool m_is_rigid_body; // Should friction give me a change in angular momentum?
- int m_static; // temporarily static.
-
};
#endif
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
index a0d5c983031..80e8c635cbb 100644
--- a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
+++ b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Scene.h
@@ -104,7 +104,6 @@ public:
// 'subSampling' can be used to control aliasing effects
// (fast moving objects traversing through walls and such).
bool proceed(MT_Scalar curtime, MT_Scalar ticrate);
- void proceed(MT_Scalar subStep);
/**
* Test whether any objects lie on the line defined by from and
@@ -168,7 +167,7 @@ private:
* collision tests. */
T_ObjectList m_objectList;
- unsigned int m_frames;
+ MT_Scalar m_lastTime;
};
#endif