/**
 * @readonly
 * @type {number}
 */
export const NULL_POINTER: number;
/**
 * A high-performance memory-efficient, binary-backed topological data structure for representing 3D meshes.
 * Manages interconnected vertices, edges, loops, and faces using contiguous memory pools.
 */
export class BinaryTopology {
    /**
     * structure:
     *      coordinate: float32[3] // vertex coordinates
     *      normal: float32[3] // vertex normal
     *      edge_pointer: uint32 // Pointer to (any) edge using this vertex (for disk cycles)
     *
     * @type {BinaryElementPool}
     * @private
     */
    private __vertex_pool;
    /**
     * structure:
     *      v1: uint32 // Vertices (unordered)
     *      v2: uint32 // Vertices (unordered)
     *      l: uint32 // The list of loops around the edge points at a Loop
     *      v1_disk_link: uint32[2] // Disk Cycle Pointers edge around vertex v1 and d2 does the same for v2.
     *      v2_disk_link: uint32[2] // see above
     *
     * Disk cycle convention:
     *   For every vertex v with at least one incident edge, the edges incident
     *   to v form a doubly-linked cycle threaded through their disk_link slots.
     *   Each non-self-loop edge e uses exactly ONE slot in v's cycle: the v1
     *   slot if `vertex1(e) === v`, otherwise the v2 slot. Callers select the
     *   side with `is_v1 = edge_read_vertex1(e) === v`.
     *
     *   Self-loops (vertex1(e) === vertex2(e) === v) are represented with ONE
     *   slot too, by convention the v1 slot. The v2_disk_link of a self-loop is
     *   UNSPECIFIED -- readers must not follow it, writers must not assume any
     *   prior value. Insertion/removal helpers must be called exactly once per
     *   self-loop (not once per "endpoint"), otherwise the v1 slot is scribbled
     *   on a second time and the cycle is corrupted.
     * @type {BinaryElementPool}
     * @private
     */
    private __edge_pool;
    /**
     * Loop represents a corner of the face
     * structure:
     *      v: uint32 // The vertex this loop points to. This vertex must be unique within the cycle
     *      e: uint32 // The edge this loop uses.
     *      f: uint32 // The face this loop is part of.
     *      radial_next: uint32 // Other loops connected to this edge.
     *      radial_prev: uint32
     *      next: uint32 // Other loops that are part of this face.
     *      prev: uint32
     * @type {BinaryElementPool}
     * @private
     */
    private __loop_pool;
    /**
     * structure:
     *      l_first: uint32 // first loop pointer
     *      no: float32[3] // Face normal
     * @type {BinaryElementPool}
     * @private
     */
    private __face_pool;
    /**
     * Optional opaque per-vertex data pool. Item IDs map 1:1 with vertex IDs.
     * Null until {@link create_vertex_data} is called.
     * @type {BinaryElementPool|null}
     * @private
     */
    private __vertex_data_pool;
    /**
     * Optional opaque per-edge data pool. Item IDs map 1:1 with edge IDs.
     * @type {BinaryElementPool|null}
     * @private
     */
    private __edge_data_pool;
    /**
     * Optional opaque per-loop data pool. Item IDs map 1:1 with loop IDs.
     * @type {BinaryElementPool|null}
     * @private
     */
    private __loop_data_pool;
    /**
     * Optional opaque per-face data pool. Item IDs map 1:1 with face IDs.
     * @type {BinaryElementPool|null}
     * @private
     */
    private __face_data_pool;
    /**
     * Total (approximate) size of this structure in memory, in bytes
     * @return {number}
     */
    get byteSize(): number;
    /**
     * Releases excess memory held by internal pools.
     * Useful for serialization use cases.
     */
    trim(): void;
    /**
     *
     * @return {BinaryElementPool}
     */
    get vertices(): BinaryElementPool;
    /**
     * Edges are shared among faces, edges point to 2 unordered vertices
     * @return {BinaryElementPool}
     */
    get edges(): BinaryElementPool;
    /**
     * Loops are corners of faces, a single vertex can be associated with many loops, one per connected face
     * @return {BinaryElementPool}
     */
    get loops(): BinaryElementPool;
    /**
     *
     * @returns {BinaryElementPool}
     */
    get faces(): BinaryElementPool;
    /**
     * Opaque per-vertex data. The user is responsible for encoding/decoding the bytes,
     * and for keeping the pool's allocation in sync with {@link vertices} — typically
     * by calling `vertex_data.allocate()` whenever a vertex is allocated.
     * Slot at vertex ID X holds that vertex's data.
     * @returns {BinaryElementPool|null} null when no data pool has been created
     */
    get vertex_data(): BinaryElementPool;
    /**
     * Opaque per-edge data. See {@link vertex_data}.
     * @returns {BinaryElementPool|null} null when no data pool has been created
     */
    get edge_data(): BinaryElementPool;
    /**
     * Opaque per-loop data. See {@link vertex_data}.
     * @returns {BinaryElementPool|null} null when no data pool has been created
     */
    get loop_data(): BinaryElementPool;
    /**
     * Opaque per-face data. See {@link vertex_data}.
     * @returns {BinaryElementPool|null} null when no data pool has been created
     */
    get face_data(): BinaryElementPool;
    /**
     * Create an opaque per-vertex data pool. If vertices already exist, the pool is
     * sized to match (bytes zero-initialized).
     *
     * After this returns, it is the caller's responsibility to keep the data pool's
     * allocation in sync with {@link vertices} (call `vertex_data.allocate()` /
     * `vertex_data.allocate_continuous(n)` / `vertex_data.release(id)` /
     * `vertex_data.clear()` alongside the matching base pool calls).
     *
     * @param {number} item_size_bytes
     */
    create_vertex_data(item_size_bytes: number): void;
    /**
     * Create an opaque per-edge data pool. See {@link create_vertex_data}.
     * @param {number} item_size_bytes
     */
    create_edge_data(item_size_bytes: number): void;
    /**
     * Create an opaque per-loop data pool. See {@link create_vertex_data}.
     * @param {number} item_size_bytes
     */
    create_loop_data(item_size_bytes: number): void;
    /**
     * Create an opaque per-face data pool. See {@link create_vertex_data}.
     * @param {number} item_size_bytes
     */
    create_face_data(item_size_bytes: number): void;
    /**
     * @returns {boolean} true if a data pool was removed, false if there was none
     */
    delete_vertex_data(): boolean;
    /**
     * @returns {boolean} true if a data pool was removed, false if there was none
     */
    delete_edge_data(): boolean;
    /**
     * @returns {boolean} true if a data pool was removed, false if there was none
     */
    delete_loop_data(): boolean;
    /**
     * @returns {boolean} true if a data pool was removed, false if there was none
     */
    delete_face_data(): boolean;
    /**
     * @param {BinaryElementPool} base
     * @param {number} item_size_bytes
     * @returns {BinaryElementPool}
     * @private
     */
    private __create_data_pool;
    /**
     * Clear the topology, removed all data
     */
    clear(): void;
    /**
     *
     * @param {number[]|ArrayLike<number>|Float32Array} result
     * @param {number} result_offset
     * @param {number} id vertex ID
     */
    vertex_read_coordinate(result: number[] | ArrayLike<number> | Float32Array, result_offset: number, id: number): void;
    /**
     *
     * @param {number} id
     * @param {number[]|Float32Array} value
     * @param {number} value_offset
     */
    vertex_write_coordinate(id: number, value: number[] | Float32Array, value_offset: number): void;
    /**
     *
     * @param {number[]|ArrayLike<number>|Float32Array} result
     * @param {number} result_offset
     * @param {number} id vertex ID
     */
    vertex_read_normal(result: number[] | ArrayLike<number> | Float32Array, result_offset: number, id: number): void;
    /**
     *
     * @param {number} id
     * @param {number[]|Float32Array} value
     * @param {number} value_offset
     */
    vertex_write_normal(id: number, value: number[] | Float32Array, value_offset: number): void;
    /**
     * @param {number} id
     * @returns {number}
     */
    vertex_read_edge(id: number): number;
    /**
     *
     * @param {number} edge_id
     * @param {number} id
     */
    vertex_write_edge(id: number, edge_id: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number}
     */
    edge_read_vertex1(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id edge ID
     */
    edge_write_vertex1(id: number, value: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number}
     */
    edge_read_vertex2(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id edge ID
     */
    edge_write_vertex2(id: number, value: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number}
     */
    edge_read_loop(id: number): number;
    /**
     *
     * @param {number} loop_id loop ID
     * @param {number} id edge ID
     */
    edge_write_loop(id: number, loop_id: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number} edge ID
     */
    edge_read_v1_disk_next(id: number): number;
    /**
     *
     * @param {number} value edge ID
     * @param {number} id edge ID
     */
    edge_write_v1_disk_next(id: number, value: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number} edge ID
     */
    edge_read_v1_disk_prev(id: number): number;
    /**
     *
     * @param {number} value edge ID
     * @param {number} id edge ID
     */
    edge_write_v1_disk_prev(id: number, value: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number} edge ID
     */
    edge_read_v2_disk_next(id: number): number;
    /**
     *
     * @param {number} value edge ID
     * @param {number} id edge ID
     */
    edge_write_v2_disk_next(id: number, value: number): void;
    /**
     * @param {number} id edge ID
     * @returns {number} edge ID
     */
    edge_read_v2_disk_prev(id: number): number;
    /**
     *
     * @param {number} value edge ID
     * @param {number} id edge ID
     */
    edge_write_v2_disk_prev(id: number, value: number): void;
    /**
     * Allocate a new vertex and, if the vertex data pool exists, ensure its
     * underlying buffer has capacity for the new ID. Tracking the data pool's
     * __size remains the caller's responsibility.
     * @returns {number} vertex ID
     */
    vertex_create(): number;
    /**
     * Allocate a new edge. See {@link vertex_create}.
     * @returns {number} edge ID
     */
    edge_create(): number;
    /**
     * Allocate a new face. See {@link vertex_create}.
     * @returns {number} face ID
     */
    face_create(): number;
    /**
     * Allocate a new loop and put it into a valid initial state.
     * See {@link vertex_create} for the data pool sync semantics.
     * @returns {number} loop ID
     */
    loop_create(): number;
    /**
     * Put loop into valid initial state, set all pointers to NULL
     * @param {number} id
     */
    loop_initialize(id: number): void;
    /**
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_vertex(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_vertex(id: number, value: number): void;
    /**
     *
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_edge(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_edge(id: number, value: number): void;
    /**
     *
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_face(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_face(id: number, value: number): void;
    /**
     *
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_radial_next(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_radial_next(id: number, value: number): void;
    /**
     *
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_radial_prev(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_radial_prev(id: number, value: number): void;
    /**
     *
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_next(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_next(id: number, value: number): void;
    /**
     *
     * @param {number} id loop ID
     * @returns {number}
     */
    loop_read_prev(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id loop ID
     */
    loop_write_prev(id: number, value: number): void;
    /**
     *
     * @param {number} id face ID
     * @returns {number}
     */
    face_read_loop(id: number): number;
    /**
     *
     * @param {number} value
     * @param {number} id face ID
     */
    face_write_loop(id: number, value: number): void;
    /**
     * @param {number[]|ArrayLike<number>|Float32Array} result
     * @param {number} result_offset
     * @param {number} id face ID
     */
    face_read_normal(result: number[] | ArrayLike<number> | Float32Array, result_offset: number, id: number): void;
    /**
     * @param {number} id face ID
     * @param {number[]|Float32Array} value
     * @param {number} value_offset
     */
    face_write_normal(id: number, value: number[] | Float32Array, value_offset: number): void;
    /**
     * Copy data from another mesh.
     * @param {BinaryTopology} other
     */
    copy(other: BinaryTopology): void;
    /**
     *
     * @returns {BinaryTopology}
     */
    clone(): BinaryTopology;
    /**
     * Useful for type checking
     * @readonly
     * @type {boolean}
     */
    readonly isBinaryTopology: boolean;
}
import { BinaryElementPool } from "./BinaryElementPool.js";
//# sourceMappingURL=BinaryTopology.d.ts.map