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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-07-07 23:21:20 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-07-19 17:58:27 +0300
commit0bf8096501a8e7883f4061ba3e425966ba7517cd (patch)
tree0535d2a4df15dc45c02b114bdd34f615f3a0d61a /source/blender/blenlib/BLI_math_vector.h
parent51f14cfa43e5fe4bdea6fbd5c668a44919657f99 (diff)
Resolve the opposite vector ambiguity in Damped Track constraint.
Damped Track by specification attempts to arrive at the desired direction via the shortest rotation. However with opposite vectors there are infinitely many valid 180 degree rotations. Currently it gives up and does nothing. I think that it would be more reasonable to resolve the ambiguity arbitrarily, so that Damped Track won't have a weird dead zone. To make it more predictable I use a local axis. In addition, the singularity area vicinity has some floating point precision problems that result in significant jitter. This applies workarounds for two causes of instability. Differential Revision: https://developer.blender.org/D3530
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r--source/blender/blenlib/BLI_math_vector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 3f603311530..39625346756 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -169,6 +169,7 @@ MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUS
MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
+MINLINE void cross_v3_v3v3_hi_prec(float r[3], const float a[3], const float b[3]);
MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);