/**
 * Convex polyhedron collider.
 *
 * Holds a convex triangle surface (`vertices` + outward-CCW `indices`) and the
 * derived face half-spaces. Because it is convex (`is_convex === true`, the
 * default), it routes straight through the narrowphase's GJK + EPA path via
 * {@link support} — no tetrahedralisation, no per-triangle decomposition, no
 * BVH. This is the right shape for authored convex geometry (props, crates,
 * gems, low-poly rocks, an icosphere) and is far cheaper to construct than
 * {@link MeshShape3D}, which tetrahedralises its interior.
 *
 * Contract:
 *   - `support` is exact for any convex point set (deepest vertex along the
 *     direction) — the precondition GJK relies on.
 *   - `contains_point` is the convex half-space test (behind every face plane).
 *   - `signed_distance` / `nearest_point_on_surface` scan the surface triangles
 *     (O(F)); these are query-path helpers, not on the collision hot path.
 *
 * The input is assumed convex with outward-facing CCW winding — build it via
 * {@link ConvexHullShape3D.from}. A genuine non-convex mesh belongs in
 * {@link MeshShape3D} (and, once decomposition lands, will be represented as a
 * set of these pieces).
 *
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class ConvexHullShape3D extends AbstractShape3D {
    /**
     * Build from a convex triangle surface. Vertices must lie on the hull and
     * faces must wind CCW when viewed from outside.
     *
     * @param {Float32Array} vertices flat `(x, y, z)` per vertex
     * @param {Uint32Array}  indices  three uint32 per triangle, outward CCW
     * @returns {ConvexHullShape3D}
     */
    static from(vertices: Float32Array, indices: Uint32Array): ConvexHullShape3D;
    /**
     * Hull vertex positions, flat `(x, y, z)` per vertex, in the body's
     * local frame. Fed to {@link support}.
     * @type {Float32Array}
     */
    vertices: Float32Array;
    /**
     * Surface triangle indices, three uint32 per face (outward CCW). Used by
     * the surface-scan query helpers (signed distance / nearest point).
     * @type {Uint32Array}
     */
    indices: Uint32Array;
    /**
     * Polygon-face representation for the contact clipper (CSR): face `f`'s
     * vertex loop is `face_loops[face_offsets[f] .. face_offsets[f+1]]`,
     * ordered CCW (outward). Currently one triangle per face; a coplanar-merge
     * pass will collapse coplanar triangles into larger polygon faces.
     * @type {Uint32Array}
     */
    face_offsets: Uint32Array;
    /** @type {Uint32Array} */
    face_loops: Uint32Array;
    /**
     * Face half-spaces, four doubles per face `(nx, ny, nz, d)` with unit
     * outward normal and `d = n · v` — point is inside iff `n · p − d ≤ 0`
     * for every face. Derived in {@link recompute}.
     * @private
     * @type {Float64Array}
     */
    private __planes;
    /** @private @type {Float64Array} */
    private __bbox;
    /** @private @type {number} */
    private __volume;
    /** @private @type {number} */
    private __surface_area;
    /**
     * Refresh the cached bbox / face planes / volume / surface area from the
     * current `vertices` / `indices`.
     */
    recompute(): void;
    compute_bounding_box(result: any): void;
    /**
     * GJK support: the hull vertex furthest along the direction. Exact for a
     * convex point set. Linear scan over the vertices — fine for the modest
     * vertex counts of authored hulls; a hill-climb over vertex adjacency is
     * the acceleration for very large hulls.
     */
    support(result: any, result_offset: any, direction_x: any, direction_y: any, direction_z: any): void;
    /**
     * Convex half-space test: inside iff the point is behind (or on) every face
     * plane. Exact for a convex polytope.
     */
    contains_point(point: any): boolean;
    /**
     * Unsigned nearest-surface distance via a per-triangle scan, signed by
     * {@link contains_point}. Same approach as {@link MeshShape3D}; O(F).
     */
    signed_distance_at_point(point: any): number;
    signed_distance_gradient_at_point(result: any, point: any): number;
    nearest_point_on_surface(result: any, reference: any): void;
    sample_random_point_in_volume(result: any, result_offset: any, random: any): void;
    /**
     * @param {ConvexHullShape3D} other
     * @returns {boolean}
     */
    equals(other: ConvexHullShape3D): boolean;
    /**
     * Fast type-check marker.
     * @readonly
     * @type {boolean}
     */
    readonly isConvexHullShape3D: boolean;
}
import { AbstractShape3D } from "./AbstractShape3D.js";
//# sourceMappingURL=ConvexHullShape3D.d.ts.map