Age | Commit message (Collapse) | Author |
|
Conflicts:
source/blender/blenkernel/intern/rigidbody.c
|
|
Also added note that direction parameter should be normalized vector
in case one intend to use returned distance values.
|
|
|
|
|
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
|
|
`dist_squared_ray_to_seg_v3`.
|
|
|
|
This patch does not make any difference for a user's POV. But it is a step for adding the occlusion test for snapping functions.
This new function finds the node(aabb) whose projection is closest to a screen coordinate.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3180
|
|
|
|
Also comment unused vars
|
|
BLI_match and remove confusing parameters.
|
|
|
|
Tabs in middle of code (mostly for no reason / by accident).
|
|
Previously quads always split along first-third vertices.
This is still the default, to avoid flickering with animated deformation
however concave quads that would create two opposing triangles now use
second-fourth split.
Reported as T53999 although this issue has been known limitation
for a long time.
|
|
|
|
Original code by @mano-wii, modified for general use.
|
|
This exposes end-point bias argument, needed in rare cases.
|
|
Also remove duplicate & mismatching comments from grease-pencil header.
Keep comments close to implementation to avoid getting out of sync.
|
|
Use for calculating the angle between 2 directions on an axis.
Also signed version and normalized plane projection,
use when input is normalized.
|
|
|
|
|
|
The new `isect_ray_aabb_v3_simple` function replaces the `BKE_boundbox_ray_hit_check` and can be used in BVHTree Root (first AABB). So it is much more efficient.
|
|
This adds two functions to project 3d coordinates onto a 3d plane,
to get 2d coordinates, essentially eliminating the plane's normal axis
from the coordinates.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2460
|
|
This splits `interp_weights_face_v3` into `interp_weights_tri_v3` and
`interp_weights_quad_v3`, in order to properly handle three sided polygons
without needing a useless extra index in your weight array. This also
improves clarity and consistency with other math_geom functions, thus
reducing potential future errors.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2461
|
|
Other than implementing a `mid_v3_v3_array` function, this removes
`cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and
`mid_v3_v3v3v3v3` respectively.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2459
|
|
Note which GL functions these are equivalent to.
|
|
Seems to be a typo in recent commit e1e49fd.
|
|
- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix
duplicating 'angle_to_mat2' - now used instead.
(better avoid matching functions having different behavior).
- Add 'axis_angle_to_mat4_single',
convenience wrapper for 'axis_angle_to_mat3_single'.
- Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.
|
|
Bitmap drawing is out-of-scope for a general math API,
move to BLI_bitmap_draw_2d.
|
|
|
|
changes in BLI_kdopbvh:
- `BLI_bvhtree_find_nearest_to_ray` now takes is_ray_normalized and scale argument.
- `BLI_bvhtree_find_nearest_to_ray_angle` has been added (use for perspective view).
changes in BLI_bvhutils:
- `bvhtree_from_editmesh_edges_ex` was added.
changes in math_geom:
- `dist_squared_ray_to_seg_v3` was added.
other changes:
- `do_ray_start_correction` is no longer necessary to snap to verts.
- the way in which the test of depth was done before is being simulated in callbacks.
|
|
So the error seems to be in cubic_tangent_factor_circle_v3(),
which was introduced with D2001.
I've tweaked the most obvious culprit here - the epsilon factor.
It used to be 10^-7, but I've reduced it down to 10^-5 now,
and it's looking a lot more stable now :)
---------
BTW, about the derivation of the magic 0.390464 factor I briefly subbed back
as a workaround for this bug, see:
http://www.whizkidtech.redprince.net/bezier/circle/
|
|
|
|
|
|
|
|
Gives a bit better precision than creating a line in some cases,
use for ED_view3d_win_to_3d.
|
|
|
|
Sign is known in this case, no need to check for either direction.
|
|
|
|
|
|
|
|
|
|
|
|
Calculate the clipped min/max factor along the segment,
only applying to the coordinates at the end (will give better precision too).
Also make split input/output args.
|
|
|
|
Follow isect_ray_tri_watertight_v3 naming.
|
|
Instead of running the callback per-pixel,
pass the x-span to the callback.
|
|
For a line this makes sense but segments should clamp,
avoids assert in edge-rip.
|