Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup bli
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* Extract 2D convex hull.
*
* \param points: An array of 2D points.
* \param n: The number of points in points.
* \param r_points: An array of the convex hull vertex indices (max is n).
* \return The number of indices in r_points.
* \note Performance is `O(n.log(n))`, same as `qsort`.
int BLI_convexhull_2d(const float (*points)[2], int n, int r_points[/* n */]);
* \return The best angle for fitting the points to an axis aligned bounding box.
* \note We could return the index of the best edge too if its needed.
* \param points: Arbitrary 2d points.
float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], int n);
}