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
AgeCommit message (Collapse)Author
2018-07-25Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/rigidbody.c
2018-07-25Fix (unreported) potential div-by-zero in ray/bbox intersection BLI code.Bastien Montagne
Also added note that direction parameter should be normalized vector in case one intend to use returned distance values.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for BLICampbell Barton
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-05-20Cleanup: whitespace, duplicate includesCampbell Barton
2018-05-17BLI_math_geom: Separate the `isect_ray_seg_v3` from ↵Germano
`dist_squared_ray_to_seg_v3`.
2018-05-15BLI_math: Added isect_point_planes_v3_negated function.Germano
2018-05-14New function for BLI_kdopbvh: `BLI_bvhtree_find_nearest_projected`.Germano
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
2018-05-13Cleanup: BLI_math: Simplify dist_squared_to_projected_aabb functions.Germano
2018-05-12Fix missing fallback in recent aabb precalc funcCampbell Barton
Also comment unused vars
2018-05-12Refactor: Move functions to get the distance to a projected aabb to ↵Germano
BLI_match and remove confusing parameters.
2018-04-21BLI math: clamped barycentric weight calculationCampbell Barton
2018-03-23Cleanup: stray tabsCampbell Barton
Tabs in middle of code (mostly for no reason / by accident).
2018-02-08Mesh: concave quad supportCampbell Barton
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.
2017-10-06Cleanup: Math lib naming (use v3 suffix)Campbell Barton
2017-10-02Math Lib: distance to AABBCampbell Barton
Original code by @mano-wii, modified for general use.
2017-08-12Math Lib: add isect_seg_seg_v2_point_exCampbell Barton
This exposes end-point bias argument, needed in rare cases.
2017-06-19Cleanup: doxygen commentsCampbell Barton
Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync.
2017-06-15Math Lib: add angle_on_axis_v3v3_v3Campbell Barton
Use for calculating the angle between 2 directions on an axis. Also signed version and normalized plane projection, use when input is normalized.
2017-03-12Comments: minor clarificationCampbell Barton
2017-02-17Remove unused functions related to distance between BoundBox and rayGermano Cavalcante
2017-01-29New math_geom function `isect_ray_aabb_v3_simple`Germano Cavalcante
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.
2017-01-14Add 3d to 2d plane mapping functions to math libLuca Rood
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
2017-01-11Split interp_weights_face_v3 into specific functions for tris and quadsLuca Rood
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
2017-01-11Add mid_v3_v3_array function and remove redundant functionsLuca Rood
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
2016-12-27Comments: hints for perspective functionsCampbell Barton
Note which GL functions these are equivalent to.
2016-11-29Math lib: Fix use function of wrong dimensionSergey Sharybin
Seems to be a typo in recent commit e1e49fd.
2016-11-25Math Lib: rotate matrix cleanupCampbell Barton
- 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'.
2016-10-26Cleanup: move bitmap drawing into its own moduleCampbell Barton
Bitmap drawing is out-of-scope for a general math API, move to BLI_bitmap_draw_2d.
2016-09-01Math Lib: avoid char > int conversion w/ line plotCampbell Barton
2016-06-30Transform Snap: Optimize edge-snap using BVH treeGermano Cavalcante
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.
2016-06-27Bendy Bones Instability Fix - Second AttemptJoshua Leung
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/
2016-06-27Docs: arg namesCampbell Barton
2016-05-23BLI_math: Add function to calculate circular cubic curve tangentsCampbell Barton
2016-04-14Remove redundant abs ray/line point functionsCampbell Barton
2016-04-14Math Lib: ray_point_factor_v3 functionsCampbell Barton
Gives a bit better precision than creating a line in some cases, use for ED_view3d_win_to_3d.
2016-04-10Docs: comment on line-sphere intersectionCampbell Barton
2016-03-11Minor improvement to last commitCampbell Barton
Sign is known in this case, no need to check for either direction.
2016-03-11Math Lib: less complex convex quad checkCampbell Barton
2016-03-05Cleanup: quiet -Wcomma, cast to void where neededCampbell Barton
2016-02-11Cleanup: naming for NearestRayToAABB_PrecalcGermano Cavalcante
2016-01-26Correct commented printfsCampbell Barton
2016-01-25Math Lib: Add dist_squared_ray_to_aabb_v3 utilityGermano Cavalcante
2016-01-23Math Lib: optimize segment-plane clippingCampbell Barton
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.
2016-01-20error in last commitCampbell Barton
2016-01-20Cleanup: naming conventionCampbell Barton
Follow isect_ray_tri_watertight_v3 naming.
2016-01-08Math Lib: use x-span for fill_poly_v2i_n callbackCampbell Barton
Instead of running the callback per-pixel, pass the x-span to the callback.
2015-12-23Math Lib: clamp closest_to_line_segment_v# when segment has no lengthCampbell Barton
For a line this makes sense but segments should clamp, avoids assert in edge-rip.