diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | extern/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_collision.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/SConscript | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collision.c | 24 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 2 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 2 |
8 files changed, 20 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f96f223c97d..a3baf582b9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,6 @@ option(WITH_BUILDINFO "Include extra build details (only disable for develop option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON) option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF) option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) -option(WITH_ELTOPO "Enable Eltopo Continuous Collision Engine" OFF) option(WITH_GAMEENGINE "Enable Game Engine" ON) option(WITH_PLAYER "Build Player" OFF) # (unix defaults to OpenMP On) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index c146d6dba83..3990d132757 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -31,7 +31,7 @@ if(WITH_BULLET) add_subdirectory(bullet2) endif() -if(WITH_ELTOPO) +if(WITH_MOD_CLOTH_ELTOPO) add_subdirectory(eltopo) endif() diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index 7018a638831..4048ee2f457 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -64,7 +64,7 @@ struct LinkNode; typedef enum { COLLISION_IN_FUTURE = (1 << 1), -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO COLLISION_USE_COLLFACE = (1 << 2), COLLISION_IS_EDGES = (1 << 3), #endif @@ -85,7 +85,7 @@ typedef struct CollPair float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 int flag; float time; // collision time, from 0 up to 1 -#ifdef USE_ELTOPO /*either ap* or bp* can be set, but not both*/ +#ifdef WITH_ELTOPO /*either ap* or bp* can be set, but not both*/ float bary[3]; int ap1, ap2, ap3, collp, bp1, bp2, bp3; int collface; diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 4b36b714548..ca551e1634a 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -240,9 +240,9 @@ if(WITH_BULLET) add_definitions(-DUSE_BULLET) endif() -if(WITH_ELTOPO) +if(WITH_MOD_CLOTH_ELTOPO) list(APPEND INC ../../../extern/eltopo) - add_definitions(-DUSE_ELTOPO) + add_definitions(-DWITH_ELTOPO) endif() if(WITH_IMAGE_OPENEXR) diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 66011c4f396..dc327abd3ad 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -29,7 +29,7 @@ if env['WITH_BF_PYTHON']: if env['WITH_BF_ELTOPO']: incs += ' ../../../extern/eltopo' - defs.append('USE_ELTOPO') + defs.append('WITH_ELTOPO') if env['WITH_BF_QUICKTIME']: incs += ' ../quicktime' diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 064f805d046..e2a1b0dfb33 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -66,7 +66,7 @@ #include "BLI_kdopbvh.h" #include "BKE_collision.h" -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO #include "eltopo-capi.h" #endif @@ -493,7 +493,7 @@ DO_INLINE void collision_interpolateOnTriangle ( float to[3], float v1[3], float VECADDMUL ( to, v3, w3 ); } -#ifndef USE_ELTOPO +#ifndef WITH_ELTOPO static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { int result = 0; @@ -608,9 +608,9 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM } return result; } -#endif +#endif /* !WITH_ELTOPO */ -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO typedef struct edgepairkey { int a1, a2, b1, b2; } edgepairkey; @@ -1392,7 +1392,7 @@ static void machine_epsilon_offset(Cloth *cloth) { } } -#else +#else /* !WITH_ELTOPO */ //Determines collisions on overlap, collisions are written to collpair[i] and collision+number_collision_found is returned static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, @@ -1557,7 +1557,7 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, } return collpair; } -#endif +#endif /* WITH_ELTOPO */ #if 0 @@ -2269,7 +2269,7 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis CollPair **collisions, CollPair **collisions_index, int numresult, BVHTreeOverlap *overlap, double dt) { int i; -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO GHash *visithash = BLI_ghash_new(edgepair_hash, edgepair_cmp, "visthash, collision.c"); GHash *tri_visithash = BLI_ghash_new(tripair_hash, tripair_cmp, "tri_visthash, collision.c"); MemArena *arena = BLI_memarena_new(1<<16, "edge hash arena, collision.c"); @@ -2278,7 +2278,7 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis *collisions = ( CollPair* ) MEM_mallocN ( sizeof ( CollPair ) * numresult * 64, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision *collisions_index = *collisions; -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO machine_epsilon_offset(clmd->clothObject); for ( i = 0; i < numresult; i++ ) @@ -2295,13 +2295,13 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis BLI_ghash_free(visithash, NULL, NULL); BLI_ghash_free(tri_visithash, NULL, NULL); BLI_memarena_free(arena); -#else +#else /* WITH_ELTOPO */ for ( i = 0; i < numresult; i++ ) { *collisions_index = cloth_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd, overlap+i, *collisions_index, dt ); } -#endif +#endif /* WITH_ELTOPO */ } @@ -2327,13 +2327,13 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision if ( collmd->bvhtree ) { -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO result += cloth_collision_response_moving(clmd, collmd, collisions, collisions_index); result += cloth_edge_collision_response_moving(clmd, collmd, collisions, collisions_index); #else result += cloth_collision_response_static ( clmd, collmd, collisions, collisions_index ); #endif -#ifdef USE_ELTOPO +#ifdef WITH_ELTOPO { #else // apply impulses in parallel diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index c3a7b6b204d..099661f7914 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1753,7 +1753,7 @@ static void simulate_implicit_euler(lfVector *Vnew, lfVector *UNUSED(lX), lfVect (edge distance constraints) in a lagrangian solver. then add forces to help guide the implicit solver to that state. this function is called after collisions*/ -int cloth_calc_helper_forces(Object *ob, ClothModifierData * clmd, float (*initial_cos)[3], float step, float dt) +int cloth_calc_helper_forces(Object *UNUSED(ob), ClothModifierData * clmd, float (*initial_cos)[3], float UNUSED(step), float dt) { Cloth *cloth= clmd->clothObject; float (*cos)[3] = MEM_callocN(sizeof(float)*3*cloth->numverts, "cos cloth_calc_helper_forces"); diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index d8114ce9537..a039dca208e 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -816,7 +816,7 @@ endif() bf_intern_mikktspace ) - if(WITH_ELTOPO) + if(WITH_MOD_CLOTH_ELTOPO) list(APPEND BLENDER_SORTED_LIBS extern_eltopo) endif() |