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')
-rw-r--r--source/gameengine/Physics/Bullet/CMakeLists.txt25
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp1
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.h58
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h2
-rw-r--r--source/gameengine/Physics/Dummy/CMakeLists.txt6
-rw-r--r--source/gameengine/Physics/common/CMakeLists.txt6
7 files changed, 57 insertions, 45 deletions
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt
index a984d0436f0..971c8f979f3 100644
--- a/source/gameengine/Physics/Bullet/CMakeLists.txt
+++ b/source/gameengine/Physics/Bullet/CMakeLists.txt
@@ -30,19 +30,22 @@ remove_strict_flags()
set(INC
.
../common
- ../../../../extern/bullet2/src
- ../../../../intern/moto/include
- ../../../../intern/guardedalloc
- ../../../../intern/container
- ../../../../intern/string
- ../../Rasterizer
- ../../Ketsji
../../Expressions
../../GameLogic
+ ../../Ketsji
+ ../../Rasterizer
../../SceneGraph
- ../../../../source/blender/makesdna
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenkernel
+ ../../../blender/blenkernel
+ ../../../blender/blenlib
+ ../../../blender/makesdna
+ ../../../../extern/bullet2/src
+ ../../../../intern/container
+ ../../../../intern/guardedalloc
+ ../../../../intern/moto/include
+ ../../../../intern/string
+)
+
+set(INC_SYS
${GLEW_INCLUDE_PATH}
${PYTHON_INCLUDE_DIRS}
)
@@ -61,4 +64,4 @@ if(WITH_BULLET)
add_definitions(-DUSE_BULLET)
endif()
-blender_add_lib(ge_phys_bullet "${SRC}" "${INC}")
+blender_add_lib(ge_phys_bullet "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index 0c5cbb22fbc..2bc11ef5f5b 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -2142,6 +2142,7 @@ btCollisionShape* CcdShapeConstructionInfo::CreateBulletShape(btScalar margin, b
}
collisionShape = compoundShape;
}
+ break;
}
return collisionShape;
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
index 97dc65c5850..08445654916 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
@@ -226,18 +226,43 @@ struct CcdConstructionInfo
CcdConstructionInfo()
- : m_localInertiaTensor(1.f, 1.f, 1.f),
+ :m_localInertiaTensor(1.f, 1.f, 1.f),
m_gravity(0,0,0),
m_scaling(1.f,1.f,1.f),
m_mass(0.f),
- m_clamp_vel_min(-1.f),
- m_clamp_vel_max(-1.f),
+ m_clamp_vel_min(-1.f),
+ m_clamp_vel_max(-1.f),
m_restitution(0.1f),
m_friction(0.5f),
m_linearDamping(0.1f),
m_angularDamping(0.1f),
m_margin(0.06f),
m_gamesoftFlag(0),
+ m_soft_linStiff(1.f),
+ m_soft_angStiff(1.f),
+ m_soft_volume(1.f),
+ m_soft_viterations(0),
+ m_soft_piterations(1),
+ m_soft_diterations(0),
+ m_soft_citerations(4),
+ m_soft_kSRHR_CL(0.1f),
+ m_soft_kSKHR_CL(1.f),
+ m_soft_kSSHR_CL(0.5f),
+ m_soft_kSR_SPLT_CL(0.5f),
+ m_soft_kSK_SPLT_CL(0.5f),
+ m_soft_kSS_SPLT_CL(0.5f),
+ m_soft_kVCF(1.f),
+ m_soft_kDP(0.f),
+ m_soft_kDG(0.f),
+ m_soft_kLF(0.f),
+ m_soft_kPR(0.f),
+ m_soft_kVC(0.f),
+ m_soft_kDF(0.2f),
+ m_soft_kMT(0),
+ m_soft_kCHR(1.0f),
+ m_soft_kKHR(0.1f),
+ m_soft_kSHR(1.0f),
+ m_soft_kAHR(0.7f),
m_collisionFlags(0),
m_bRigid(false),
m_bSoft(false),
@@ -252,38 +277,13 @@ struct CcdConstructionInfo
m_inertiaFactor(1.f),
m_do_anisotropic(false),
m_anisotropicFriction(1.f,1.f,1.f),
- m_contactProcessingThreshold(1e10f),
- m_soft_linStiff(1.f),
- m_soft_angStiff(1.f),
- m_soft_volume(1.f),
- m_soft_viterations(0),
- m_soft_piterations(1),
- m_soft_diterations(0),
- m_soft_citerations(4),
m_do_fh(false),
m_do_rot_fh(false),
m_fh_spring(0.f),
m_fh_damping(0.f),
m_fh_distance(1.f),
m_fh_normal(false),
- m_soft_kVCF(1.f),
- m_soft_kDG(0.f),
- m_soft_kLF(0.f),
- m_soft_kDP(0.f),
- m_soft_kPR(0.f),
- m_soft_kVC(0.f),
- m_soft_kDF(0.2f),
- m_soft_kMT(0),
- m_soft_kCHR(1.0f),
- m_soft_kKHR(0.1f),
- m_soft_kSHR(1.0f),
- m_soft_kAHR(0.7f),
- m_soft_kSRHR_CL(0.1f),
- m_soft_kSKHR_CL(1.f),
- m_soft_kSSHR_CL(0.5f),
- m_soft_kSR_SPLT_CL(0.5f),
- m_soft_kSK_SPLT_CL(0.5f),
- m_soft_kSS_SPLT_CL(0.5f)
+ m_contactProcessingThreshold(1e10f)
{
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 416cef71067..3f0c4cb95a1 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -939,7 +939,7 @@ int CcdPhysicsEnvironment::createUniversalD6Constraint(
} else
{
// TODO: Implement single body case...
- //No, we can use a fixed rigidbody in above code, rather then unnecessary duplation of code
+ //No, we can use a fixed rigidbody in above code, rather than unnecessary duplation of code
}
@@ -2271,7 +2271,7 @@ PHY_IPhysicsController* CcdPhysicsEnvironment::CreateSphereController(float radi
cinfo.m_collisionShape = new btSphereShape(radius); // memory leak! The shape is not deleted by Bullet and we cannot add it to the KX_Scene.m_shapes list
cinfo.m_MotionState = 0;
cinfo.m_physicsEnv = this;
- // declare this object as Dyamic rather then static!!
+ // declare this object as Dyamic rather than static!!
// The reason as it is designed to detect all type of object, including static object
// It would cause static-static message to be printed on the console otherwise
cinfo.m_collisionFlags |= btCollisionObject::CF_NO_CONTACT_RESPONSE | btCollisionObject::CF_STATIC_OBJECT;
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
index 51e00b9111f..18e1282b111 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
@@ -128,7 +128,7 @@ protected:
virtual void setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep)
{
//based on DEFAULT_PHYSICS_TIC_RATE of 60 hertz
- setNumTimeSubSteps(fixedTimeStep/60.f);
+ setNumTimeSubSteps((int)(fixedTimeStep / 60.f));
}
//returns 0.f if no fixed timestep is used
diff --git a/source/gameengine/Physics/Dummy/CMakeLists.txt b/source/gameengine/Physics/Dummy/CMakeLists.txt
index fd7f37897eb..11230bbe571 100644
--- a/source/gameengine/Physics/Dummy/CMakeLists.txt
+++ b/source/gameengine/Physics/Dummy/CMakeLists.txt
@@ -29,10 +29,14 @@ set(INC
../common
)
+set(INC_SYS
+
+)
+
set(SRC
DummyPhysicsEnvironment.cpp
DummyPhysicsEnvironment.h
)
-blender_add_lib(ge_phys_dummy "${SRC}" "${INC}")
+blender_add_lib(ge_phys_dummy "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/gameengine/Physics/common/CMakeLists.txt b/source/gameengine/Physics/common/CMakeLists.txt
index 50aa9083089..9da7aaa6ba7 100644
--- a/source/gameengine/Physics/common/CMakeLists.txt
+++ b/source/gameengine/Physics/common/CMakeLists.txt
@@ -29,6 +29,10 @@ set(INC
../Dummy
)
+set(INC_SYS
+
+)
+
set(SRC
PHY_IMotionState.cpp
PHY_IController.cpp
@@ -47,4 +51,4 @@ set(SRC
PHY_Pro.h
)
-blender_add_lib(ge_phys_common "${SRC}" "${INC}")
+blender_add_lib(ge_phys_common "${SRC}" "${INC}" "${INC_SYS}")