chull.c File Reference
`#include "common.h"`
`#include <stdlib.h>`
`#include "bu/malloc.h"`
`#include "bu/sort.h"`
`#include "bn/chull.h"`
`#include "./bn_private.h"`
Include dependency graph for chull.c:

Go to the source code of this file.

## Macros

#define isLeft(L0, L1, p)   ((L1[X] - L0[X])*(p[Y] - L0[Y]) - (p[X] - L0[X])*(L1[Y] - L0[Y]))

## Functions

int bn_polyline_2d_chull (point2d_t **hull, const point2d_t *polyline, int n)
Routines for the computation of convex hulls in 2D and 3D. More...

HIDDEN int pnt_compare_2d (const void *pnt1, const void *pnt2, void *arg)

int bn_2d_chull (point2d_t **hull, const point2d_t *points_2d, int n)
Find 2D convex hull for unordered co-planar point sets. More...

int bn_3d_coplanar_chull (point_t **hull, const point_t *points_3d, int n)
Find 3D coplanar point convex hull for unordered co-planar point sets. More...

## Detailed Description

This file implements various algorithms for finding convex hull of point sets in 2D and 3D.

Definition in file chull.c.

## Macro Definition Documentation

 #define isLeft ( L0, L1, p ) ((L1[X] - L0[X])*(p[Y] - L0[Y]) - (p[X] - L0[X])*(L1[Y] - L0[Y]))

Definition at line 38 of file chull.c.

Referenced by bn_polyline_2d_chull().

## Function Documentation

 HIDDEN int pnt_compare_2d ( const void * pnt1, const void * pnt2, void * arg )

Definition at line 106 of file chull.c.

References NEAR_ZERO, SMALL_FASTF, and UNLIKELY.

Referenced by bn_2d_chull().