|
Blender V4.3
|
Go to the source code of this file.
Functions | |
| int | BLI_convexhull_2d (const float(*points)[2], int points_num, int r_points[]) |
| float | BLI_convexhull_aabb_fit_points_2d (const float(*points)[2], int points_num) |
Extract 2D convex hull.
| points | An array of 2D points. |
| points_num | The number of points in points. |
| r_points | An array of the convex hull vertex indices (max is points_num). Vertices are ordered counter clockwise, the polygons cross product is always negative (or zero). |
O(points_num.log(points_num)), same as qsort. Definition at line 183 of file convexhull_2d.cc.
References b, BLI_assert, convexhull_2d_sorted(), copy_v2_v2(), float, MEM_freeN(), and MEM_mallocN.
Referenced by BLI_convexhull_aabb_fit_points_2d(), convexhull_2d_as_array(), blender::geometry::PackIsland::finalize_geometry_(), blender::ed::space_node::find_bounds_by_zone_recursive(), M_Geometry_convex_hull_2d(), and blender::geometry::rotate_inside_square().
| points | Arbitrary 2D points. |
Definition at line 655 of file convexhull_2d.cc.
References angle(), BLI_assert, BLI_convexhull_2d(), convexhull_aabb_fit_hull_2d(), copy_v2_v2(), float, MEM_freeN(), and MEM_mallocN.
Referenced by convexhull_2d_aabb_fit_points_2d(), M_Geometry_box_fit_2d(), and blender::geometry::p_chart_rotate_fit_aabb().