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:
authorGermano Cavalcante <germano.costa@ig.com.br>2016-07-14 06:47:32 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2016-07-14 06:47:32 +0300
commit06908955c3fe9948fff8a1cc195ce90b8d284431 (patch)
treea03296ffc3b5098f9c929272f5dbea83432ce827 /source/gameengine
parent6771165229d5a08e4d62f4319855fd622f569222 (diff)
Improves the accuracy of snap to edges
Recently the snap to edges has been changed to work with coordinates 2d. Thus, the lambda of the snap pointon on edge becomes different from the actual lambda in a 3d edge. The solution to correct the lambda was this: ``` if (is_persp) { const float fac = depth_a / (depth_a + depth_b); lambda *= (1.0f + (fac - 0.5f) * (1.0f - lambda)); ```` ... But the lambda was still not very accurate. Now the function uses the `dist_squared_ray_to_seg_v3` to get the coordinate of the snap point on the edge. And then tests that point. The accuracy returned to normal values.
Diffstat (limited to 'source/gameengine')
0 files changed, 0 insertions, 0 deletions