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:
authormano-wii <germano.costa@ig.com.br>2018-10-01 06:16:44 +0300
committermano-wii <germano.costa@ig.com.br>2018-10-01 06:16:44 +0300
commit9df476ecaac8fb82c3d28b7404374db09e73eda4 (patch)
tree6fc0dc198fa5da4ac7a9928562f6828e3e08e5a7 /source/blender/blenlib/BLI_math_geom.h
parent1f2c4f8809aab37d04ee0c571c33466643e103b6 (diff)
BLI_math: add `isect_seg_seg_v3` function and use in the cloth collision algorith.
In my tests a 4% improvement in performance was achieved by simulating a square cloth over the cube.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r--source/blender/blenlib/BLI_math_geom.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index ccdb94c3317..d5287e8d8aa 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -207,6 +207,11 @@ void limit_dist_v3(float v1[3], float v2[3], const float dist);
#define ISECT_LINE_LINE_CROSS 2
int isect_seg_seg_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]);
+void isect_seg_seg_v3(
+ const float a0[3], const float a1[3],
+ const float b0[3], const float b1[3],
+ float r_a[3], float r_b[3]);
+
int isect_seg_seg_v2_int(const int a1[2], const int a2[2], const int b1[2], const int b2[2]);
int isect_seg_seg_v2_point_ex(
const float v0[2], const float v1[2], const float v2[2], const float v3[2], const float endpoint_bias,