blender/source
Germano Cavalcante 06908955c3 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.
2016-07-14 00:47:32 -03:00
..
blender Improves the accuracy of snap to edges 2016-07-14 00:47:32 -03:00
blenderplayer Fix bplayer (c) 2016-06-29 17:57:41 +02:00
creator writefile: reuse SDNA between writes 2016-07-12 13:03:04 +10:00
gameengine Cleanup/Refactor: pass Main pointer to all ID copy functions. 2016-07-10 14:52:00 +02:00
CMakeLists.txt