1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Raw FFI binding to the qhull C shim (`csrc/qhull_wrapper.{c,h}`).
//!
//! These are the only `unsafe extern "C"` declarations for the convex-hull
//! path. They map 1:1 to the `cobre_qhull_*` functions in
//! `csrc/qhull_wrapper.h`. Use the safe wrapper in the parent module
//! ([`super::convex_hull_3d`]) rather than calling these directly.
use ;
// ============================================================
// Status codes (mirroring csrc/qhull_wrapper.h)
// ============================================================
/// `COBRE_QHULL_OK` — success; the out-params are populated.
pub const COBRE_QHULL_OK: c_int = 0;
/// `COBRE_QHULL_ERR_COMPUTE` — qhull init/computation failure (non-degenerate,
/// non-allocation internal/precision error).
pub const COBRE_QHULL_ERR_COMPUTE: c_int = 1;
/// `COBRE_QHULL_ERR_DEGENERATE` — degenerate or insufficient input (fewer than
/// 4 affinely-independent points; no full-dimensional 3-D hull).
pub const COBRE_QHULL_ERR_DEGENERATE: c_int = 2;
/// `COBRE_QHULL_ERR_ALLOC` — memory allocation failure (qhull-internal or the
/// shim's output buffer).
pub const COBRE_QHULL_ERR_ALLOC: c_int = 3;
// ============================================================
// Convex hull
// ============================================================
unsafe extern "C"