diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-08-01 18:05:53 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-08-01 18:05:53 +0300 |
commit | 03bbd5f9dedf7b3dfea7119c172c61f0b50ae28c (patch) | |
tree | 79ab34e79af6a700c6f73f331e4ee4e253ab3751 /source/blender/blenkernel/intern/softbody.c | |
parent | 2204bfcf9e1c3a38e60830bd97775dd72158f4d6 (diff) | |
parent | 49b2162309da6abf66764d41d9fc4c45ad01936c (diff) |
Merge branch 'master' into temp-gpencil-drw-engine
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 03fbdc24ce4..2024a507ebb 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -258,7 +258,7 @@ static float _final_mass(Object *ob, BodyPoint *bp) /* just an ID here to reduce the prob for killing objects * ob->sumohandle points to we should not kill :) */ -static const int CCD_SAVETY = 190561; +static const int CCD_SAFETY = 190561; typedef struct ccdf_minmax { float minx, miny, minz, maxx, maxy, maxz; @@ -269,7 +269,7 @@ typedef struct ccd_Mesh { const MVert *mvert; const MVert *mprevvert; const MVertTri *tri; - int savety; + int safety; ccdf_minmax *mima; /* Axis Aligned Bounding Box AABB */ float bbmin[3]; @@ -298,7 +298,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob) pccd_M = MEM_mallocN(sizeof(ccd_Mesh), "ccd_Mesh"); pccd_M->mvert_num = cmd->mvert_num; pccd_M->tri_num = cmd->tri_num; - pccd_M->savety = CCD_SAVETY; + pccd_M->safety = CCD_SAFETY; pccd_M->bbmin[0] = pccd_M->bbmin[1] = pccd_M->bbmin[2] = 1e30f; pccd_M->bbmax[0] = pccd_M->bbmax[1] = pccd_M->bbmax[2] = -1e30f; pccd_M->mprevvert = NULL; @@ -486,7 +486,8 @@ static void ccd_mesh_update(Object *ob, ccd_Mesh *pccd_M) static void ccd_mesh_free(ccd_Mesh *ccdm) { - if (ccdm && (ccdm->savety == CCD_SAVETY)) { /*make sure we're not nuking objects we don't know*/ + /* Make sure we're not nuking objects we don't know. */ + if (ccdm && (ccdm->safety == CCD_SAFETY)) { MEM_freeN((void *)ccdm->mvert); MEM_freeN((void *)ccdm->tri); if (ccdm->mprevvert) { @@ -751,7 +752,7 @@ static void build_bps_springlist(Object *ob) int a, b; if (sb == NULL) { - return; /* paranoya check */ + return; /* paranoia check */ } for (a = sb->totpoint, bp = sb->bpoint; a > 0; a--, bp++) { @@ -781,7 +782,7 @@ static void calculate_collision_balls(Object *ob) float min, max, akku; if (sb == NULL) { - return; /* paranoya check */ + return; /* paranoia check */ } for (a = sb->totpoint, bp = sb->bpoint; a > 0; a--, bp++) { @@ -3322,7 +3323,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int copy_v3_v3(bp->prevdv, bp->vec); } - /* make a nice clean scratch struc */ + /* make a nice clean scratch struct */ free_scratch(sb); /* clear if any */ sb_new_scratch(sb); /* make a new */ sb->scratch->needstobuildcollider = 1; |