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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-11-16 16:59:33 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:08 +0300
commit674c98bd06a8d3752d750fb659b98ff5b9a238d8 (patch)
tree03509daa8e1537fa95c125b86a5fcf44d5197652 /source/blender/physics/intern/implicit.h
parent52384179f4c5153a62d711d326a7f6a877508dbb (diff)
Nicer hashing functionality for sim debugging using a variadic macro
to support multiple hash identifiers. Using explicit hashing functions for every sim debug call defeats the purpose of having a quick feedback system. Now this can be done simply by passing an arbitrary number of hash inputs (integers) at the end of the function calls, which are then combined by a system of variadic macros (based on the ELEM feature). Up to 8 identifiers are supported currently, but more could be added easily if needed. Conflicts: source/blender/blenkernel/intern/particle_system.c source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/physics/intern/implicit.h')
-rw-r--r--source/blender/physics/intern/implicit.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h
index e4c90c22fb2..7081dd507a9 100644
--- a/source/blender/physics/intern/implicit.h
+++ b/source/blender/physics/intern/implicit.h
@@ -74,41 +74,6 @@ BLI_INLINE void implicit_print_matrix_elem(float v)
printf("%-8.3f", v);
}
-/* ==== hash functions for debugging ==== */
-BLI_INLINE unsigned int hash_int_2d(unsigned int kx, unsigned int ky)
-{
-#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
-
- unsigned int a, b, c;
-
- a = b = c = 0xdeadbeef + (2 << 2) + 13;
- a += kx;
- b += ky;
-
- c ^= b; c -= rot(b,14);
- a ^= c; a -= rot(c,11);
- b ^= a; b -= rot(a,25);
- c ^= b; c -= rot(b,16);
- a ^= c; a -= rot(c,4);
- b ^= a; b -= rot(a,14);
- c ^= b; c -= rot(b,24);
-
- return c;
-
-#undef rot
-}
-
-BLI_INLINE int hash_vertex(int type, int vertex)
-{
- return hash_int_2d((unsigned int)type, (unsigned int)vertex);
-}
-
-BLI_INLINE int hash_collpair(int type, CollPair *collpair)
-{
- return hash_int_2d((unsigned int)type, hash_int_2d((unsigned int)collpair->face1, (unsigned int)collpair->face2));
-}
-/* ================ */
-
void BPH_mass_spring_solver_debug_data(struct Implicit_Data *id, struct SimDebugData *debug_data);
void BPH_mass_spring_set_vertex_mass(struct Implicit_Data *data, int index, float mass);