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
path: root/source
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-07-10 08:32:33 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-07-10 08:32:33 +0400
commit3a9e588d1a4e5ec4a9d2acd2d9f244c24a38c64f (patch)
tree834e99c3bf22b2e5093d061ee975aef6e4641e23 /source
parent83f5d410711b1e0f4691f3bdbbb1355be23e025a (diff)
Fix T40909: BGE softbodies broken.
Looks like softbody settings got lost in a recent cleanup.
Diffstat (limited to 'source')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp71
1 files changed, 71 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 8a8a8d33f09..69e190c79db 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -3079,10 +3079,81 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
if (blenderobject->bsoft)
{
ci.m_margin = blenderobject->bsoft->margin;
+ ci.m_gamesoftFlag = blenderobject->bsoft->flag;
+
+ ci.m_soft_linStiff = blenderobject->bsoft->linStiff;
+ ci.m_soft_angStiff = blenderobject->bsoft->angStiff; /* angular stiffness 0..1 */
+ ci.m_soft_volume = blenderobject->bsoft->volume; /* volume preservation 0..1 */
+
+ ci.m_soft_viterations = blenderobject->bsoft->viterations; /* Velocities solver iterations */
+ ci.m_soft_piterations = blenderobject->bsoft->piterations; /* Positions solver iterations */
+ ci.m_soft_diterations = blenderobject->bsoft->diterations; /* Drift solver iterations */
+ ci.m_soft_citerations = blenderobject->bsoft->citerations; /* Cluster solver iterations */
+
+ ci.m_soft_kSRHR_CL = blenderobject->bsoft->kSRHR_CL; /* Soft vs rigid hardness [0,1] (cluster only) */
+ ci.m_soft_kSKHR_CL = blenderobject->bsoft->kSKHR_CL; /* Soft vs kinetic hardness [0,1] (cluster only) */
+ ci.m_soft_kSSHR_CL = blenderobject->bsoft->kSSHR_CL; /* Soft vs soft hardness [0,1] (cluster only) */
+ ci.m_soft_kSR_SPLT_CL = blenderobject->bsoft->kSR_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */
+
+ ci.m_soft_kSK_SPLT_CL = blenderobject->bsoft->kSK_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */
+ ci.m_soft_kSS_SPLT_CL = blenderobject->bsoft->kSS_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */
+ ci.m_soft_kVCF = blenderobject->bsoft->kVCF; /* Velocities correction factor (Baumgarte) */
+ ci.m_soft_kDP = blenderobject->bsoft->kDP; /* Damping coefficient [0,1] */
+
+ ci.m_soft_kDG = blenderobject->bsoft->kDG; /* Drag coefficient [0,+inf] */
+ ci.m_soft_kLF = blenderobject->bsoft->kLF; /* Lift coefficient [0,+inf] */
+ ci.m_soft_kPR = blenderobject->bsoft->kPR; /* Pressure coefficient [-inf,+inf] */
+ ci.m_soft_kVC = blenderobject->bsoft->kVC; /* Volume conversation coefficient [0,+inf] */
+
+ ci.m_soft_kDF = blenderobject->bsoft->kDF; /* Dynamic friction coefficient [0,1] */
+ ci.m_soft_kMT = blenderobject->bsoft->kMT; /* Pose matching coefficient [0,1] */
+ ci.m_soft_kCHR = blenderobject->bsoft->kCHR; /* Rigid contacts hardness [0,1] */
+ ci.m_soft_kKHR = blenderobject->bsoft->kKHR; /* Kinetic contacts hardness [0,1] */
+
+ ci.m_soft_kSHR = blenderobject->bsoft->kSHR; /* Soft contacts hardness [0,1] */
+ ci.m_soft_kAHR = blenderobject->bsoft->kAHR; /* Anchors hardness [0,1] */
+ ci.m_soft_collisionflags = blenderobject->bsoft->collisionflags; /* Vertex/Face or Signed Distance Field(SDF) or Clusters, Soft versus Soft or Rigid */
+ ci.m_soft_numclusteriterations = blenderobject->bsoft->numclusteriterations; /* number of iterations to refine collision clusters*/
+
}
else
{
ci.m_margin = 0.f;
+ ci.m_gamesoftFlag = OB_BSB_BENDING_CONSTRAINTS | OB_BSB_SHAPE_MATCHING | OB_BSB_AERO_VPOINT;
+
+ ci.m_soft_linStiff = 0.5;
+ ci.m_soft_angStiff = 1.f; /* angular stiffness 0..1 */
+ ci.m_soft_volume = 1.f; /* volume preservation 0..1 */
+
+ ci.m_soft_viterations = 0;
+ ci.m_soft_piterations = 1;
+ ci.m_soft_diterations = 0;
+ ci.m_soft_citerations = 4;
+
+ ci.m_soft_kSRHR_CL = 0.1f;
+ ci.m_soft_kSKHR_CL = 1.f;
+ ci.m_soft_kSSHR_CL = 0.5;
+ ci.m_soft_kSR_SPLT_CL = 0.5f;
+
+ ci.m_soft_kSK_SPLT_CL = 0.5f;
+ ci.m_soft_kSS_SPLT_CL = 0.5f;
+ ci.m_soft_kVCF = 1;
+ ci.m_soft_kDP = 0;
+
+ ci.m_soft_kDG = 0;
+ ci.m_soft_kLF = 0;
+ ci.m_soft_kPR = 0;
+ ci.m_soft_kVC = 0;
+
+ ci.m_soft_kDF = 0.2f;
+ ci.m_soft_kMT = 0.05f;
+ ci.m_soft_kCHR = 1.0f;
+ ci.m_soft_kKHR = 0.1f;
+
+ ci.m_soft_kSHR = 1.f;
+ ci.m_soft_kAHR = 0.7f;
+ ci.m_soft_collisionflags = OB_BSB_COL_SDF_RS + OB_BSB_COL_VF_SS;
+ ci.m_soft_numclusteriterations = 16;
}
}
else