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-04-21BLI math: clamped barycentric weight calculationCampbell Barton
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-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-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-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-05-23BLI_math: Add function to calculate circular cubic curve tangentsCampbell 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-02-11Cleanup: naming for NearestRayToAABB_PrecalcGermano Cavalcante
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-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-15Cleanup: math lib namingCampbell Barton
Distinguish between line / line_segment
2015-12-15Cleanup: math lib namingCampbell Barton
Rename not-very-descriptive (p1, d) -> (ray_origin, ray_direction)
2015-12-15Cleanup: consistent naming for closest_to_line apiCampbell Barton
2015-12-11Math Lib: 2d ray-segment intersection functionCampbell Barton
2015-12-09Math Lib: add axis_dominant_v3_ortho_singleCampbell Barton
2015-11-12Cleanup: rename line to segments, avoids confusionCampbell Barton
Differentiate between lines and segments.
2015-10-15BLI_math: isect_ray_plane_v3 now takes 4d planeCampbell Barton
Was taking a triangle and doing ray-tri intersect.
2015-09-04Math Lib: Use plane intersect from graphics-gemsCampbell Barton
2015-08-31Alternate fix for T45849: tri-tri intersect errorCampbell Barton
Project both triangles onto the same plane to simplify calculations.
2015-08-31Math Lib: Add closest_to_plane helper functionsCampbell Barton
- closest_to_plane3 (for float3 planes) - closest_to_plane*_normalized_v3 (for unit length planes) Use when the plane is known to be unit length
2015-08-21Math Lib: watertight intersection functionCampbell Barton
From Cycles with some very minor differences.
2015-08-20Cleanup: comment out isect_ray_tri_threshold_v3Campbell Barton
Also define epsilon var for ray-cast functions.
2015-07-29Math Lib: add isect_tri_tri_epsilon_v3 functionCampbell Barton
2015-07-21Math Lib: use vector funcs for isect_line_line_v2_pointCampbell Barton
2015-07-16Add tessellation data to DerivedMesh (LoopTri)Campbell Barton
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-14Match face tessellation order in edimodeCampbell Barton
add a negated version of axis_dominant_v3_to_m3
2015-06-24Improve dist_***_to_corner_v3v3v3 precisionCampbell Barton
Remove offset before calculating distance. Define 'plane3' to BLI_math, since we often don't need the 4th component.
2015-06-23Cleanup: use 2d math funcs for line intersectionCampbell Barton
2015-05-13Project Paint: resolve ugly bleed artifactsCampbell Barton
Use the bilinear reverse to find the pixel to bleed from. Was using pixel space which didn't work well.
2015-03-04Math Lib: redundant axis flip decomposing a planeCampbell Barton
Also add a faster, non-normalized version of the function. (Neither are used currently used).
2015-03-02Fix dist_signed_squared_to_corner_v3v3v3 with concave cornersCampbell Barton
2015-02-16Math Lib: add dist_signed_squared_to_corner_v3v3v3Campbell Barton
Can be used to check if a point is inside the 2-planes defined by a face-corner.
2015-01-13Math Lib: improve area calculationCampbell Barton
- area_quad_v3 now works correctly with concave quads. - add area_squared_*** functions, to use when comparing to avoid a sqrt().
2015-01-03Refactor 'fit in camera view' code, and expose it to RNA.Bastien Montagne
This changes BKE's fitting code to use `BKE_camera_params_compute_viewplane` instead of `BKE_camera_view_frame`. This allows that code to work with orthographic projection too. Also, two funcs were added to rna's Object, to resp. get the projection matrix of that object (mostly useful for cameras and lamps objects), and return position this object should be to see all (to fit) a given set of points. Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D961
2014-12-27Fix T43034: beautify-fill leaves zero area tri'sCampbell Barton
2014-12-17Fix triangulating concave quadsCampbell Barton
Resulting triangles could be pointing in opposing directions.
2014-10-10Cleanup: use bool and const argsCampbell Barton
2014-08-16Math Lib: add isect_line_line_epsilon_v3Campbell Barton
2014-08-13Math Lib: rename barycentric_transform -> transform_point_by_tri_v3Campbell Barton
also add transform_point_by_seg_v3
2014-08-13Math Lib: name signed versions of dist_to_plane_v3 explicitlyCampbell Barton
also add unsigned versions
2014-07-21Math Lib: Add isect_point_tri_v3Campbell Barton
Add to Python via mathutils.geometry