import * as THREE from "three";
/**
 * @hidden
 */
export interface ILine {
    start: THREE.Vector3;
    end: THREE.Vector3;
}
/**
 * GeometryUtils class
 * @hidden
 */
export declare class GeometryUtils {
    /**
     * Compares two materials
     */
    static geometriesEqual(g1: THREE.BufferGeometry, g2: THREE.BufferGeometry): boolean;
    /**
     * Converts InterleavedBufferAttribute to BufferAttribute, because mergeGeometries doesn't support InterleavedBufferAttribute.
     * If it is supported by Three.js one day, we should remove this method.
     */
    static tryConvertInterleavedBufferAttributes(geometry: THREE.BufferGeometry): void;
    /**
     * Determines if the 2d point is inside the polygon
     */
    static isPointInPolygon(point: THREE.Vector2, polygon: THREE.Vector2[], includeOnSide?: boolean): boolean;
    static caculateGeometryCenter(geometry: THREE.BufferGeometry): THREE.Vector3 | null;
    static isConvex(polygon: THREE.Vector2[]): boolean;
    static areLineSegmentsIntersecting(line1: ILine, line2: ILine): boolean;
    /**
     * Tries to get intersection point of two line segments.
     * Returns undefined in case two line segments don't intersect with each other.
     */
    static getLineSegmentsIntersectingPoint(line1: ILine, line2: ILine): THREE.Vector3 | null | undefined;
    static isPointOnLineSegment(point: THREE.Vector3, line: ILine, epsilon?: number): boolean;
    static isPointOnLineSegments(point: THREE.Vector3, lines: THREE.Vector3[], epsilon?: number): boolean;
    /**
     * Checks if we should rebase points in case their values are big, and do rebase if necessary
     */
    static checkAndRebasePositionsOnRTC(positions: THREE.Vector3[] | THREE.Vector2[], offset: THREE.Vector3): boolean;
    /**
     * Checks if we should rebase a point in case its value is too large
     */
    static shouldRebasePositionOnRTC(vector: THREE.Vector3 | THREE.Vector2): boolean;
    /**
     * Calculates surface area
     */
    static calculateSurfaceArea(geometry: THREE.BufferGeometry): number;
    /**
     * Converts indexes of type line_strip to line
     * for merge
     */
    static convertLineStripToLine(geometry: THREE.BufferGeometry, bLoop?: boolean): void;
    /**
     * Convert an indexed geometry to a non-indexed geometry. Can be used for dashed line style.
     */
    static convertGeometryWithIndexedToNonIndexed(geometry: THREE.BufferGeometry): THREE.BufferGeometry;
    static createGeometryAttributeByIndex(attribute: THREE.BufferAttribute, indexBuffer: THREE.BufferAttribute): THREE.BufferAttribute<THREE.BufferAttributeEventMap>;
    /**
     * Gets start/end point of a line segment by given index
     */
    static getLineEndPointsByIndex(line: THREE.Line, index: number): THREE.Vector3[];
    static arePolygonsIntersect(polygon1: THREE.Vector2[], polygon2: THREE.Vector2[]): boolean;
    static getLineLineIntersectionPoint(a: THREE.Vector2, b: THREE.Vector2, c: THREE.Vector2, d: THREE.Vector2, epsilon?: number): THREE.Vector2 | undefined;
    static getOffsetPoint(a: THREE.Vector2, b: THREE.Vector2, offset: number): THREE.Vector2;
    static convertSimpleWidthLineToMeshGeometry(points: THREE.Vector2[], width: number): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap> | undefined;
    static convertWidthLineToMeshGeometry(points: THREE.Vector2[], width: number): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap> | undefined;
    static releaseGeometryManually(geometry: THREE.BufferGeometry): void;
    static getAdjacentNonRepeatPoints(points: THREE.Vector3[], epsilon?: number): THREE.Vector3[];
    /**
     * True when `attr` is a non-instanced per-vertex {@link THREE.BufferAttribute} or
     * {@link THREE.InterleavedBufferAttribute} with `normalized: true` and an integer
     * `TypedArray` backing (e.g. glTF normalized BYTE/SHORT or **KHR_mesh_quantization**).
     * Use this to detect attributes already stored in normalized integer form (not only `position`).
     */
    static isNormalizedIntegerVertexAttribute(attr: unknown): boolean;
    /**
     * One axis of POSITION quantization: world coordinate → stored Int16 value in
     * `[-32767, 32767]`, matching `KHR_mesh_quantization` with origin `center` and
     * half-extent `halfExtent` on this axis.
     */
    static quantizePositionComponent(world: number, center: number, halfExtent: number): number;
    /** Inverse of {@link GeometryUtils.quantizePositionComponent}: quantized → world units. */
    static dequantizePositionComponent(quantized: number, center: number, halfExtent: number): number;
    /**
     * Quantizes geometry attributes in-place for KHR_mesh_quantization-style usage.
     *
     * Converts **position** (Float32 → Int16 normalized) when possible, and clears cached
     * `boundingBox` / `boundingSphere` so world AABBs stay correct after baking the decode
     * matrix into mesh transforms.
     *
     * If **position** already satisfies {@link GeometryUtils.isNormalizedIntegerVertexAttribute}
     * (e.g. **KHR_mesh_quantization** from glTF), returns `null` and leaves the geometry unchanged
     * (no double quantization).
     *
     * Other attributes (when present, non-instanced, backed by float arrays):
     * **normal** → Int8 normalized, **uv** / **uv1–uv3** → Uint16 normalized ([0,1] only),
     * **color** → Uint8 normalized ([0,1] only), **tangent** (vec4) → Int8 normalized.
     * Does not touch **skinIndex** / **skinWeight** (skinning), morph targets, etc.
     *
     * @returns The position-decode `Matrix4` (`T(center) * S(halfExtents)`) when position was
     *          quantized, or `null` when position was left unchanged. Right-multiply into the
     *          mesh node matrix: `M_node_final = M_node_original * M_decode`.
     */
    static quantizeGeometry(geo: THREE.BufferGeometry): THREE.Matrix4 | null;
    private static meshQuantMatScratch;
    private static meshQuantInstanceTmp;
    /**
     * Walks `scene`, quantizes each unique mesh {@link THREE.BufferGeometry} (see
     * {@link GeometryUtils.quantizeGeometry}), and bakes position decode into mesh
     * transforms / instanced matrices (then syncs pq/s so {@link THREE.Object3D.matrixAutoUpdate}
     * stays compatible with controls that edit position/quaternion/scale). Used after import.
     */
    static applyMeshQuantizationToSceneRoot(scene: THREE.Object3D): THREE.Object3D;
    static mergeBBoxes(bboxes: THREE.Box3[]): THREE.Box3[];
}
