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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-02 07:44:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-02 07:44:02 +0400
commit07ee0dcc74042779511528975c2ae7956abf7478 (patch)
tree09fd0af2a6c39cfa813193867a8ff1948a85ecac /source/blender/blenkernel
parent4548063f971179f56847a4a2588ee18dfc56acc4 (diff)
build system changes to eltopo, re-applied.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_collision.h4
-rw-r--r--source/blender/blenkernel/CMakeLists.txt4
-rw-r--r--source/blender/blenkernel/SConscript2
-rw-r--r--source/blender/blenkernel/intern/collision.c24
-rw-r--r--source/blender/blenkernel/intern/implicit.c2
5 files changed, 18 insertions, 18 deletions
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");