/**
 * @module viw-webgl-viewer
 */
import * as THREE from 'three';
import { Element3D } from '../loader/element3d';
import { RenderScene } from './rendering/renderScene';
import { Camera } from './camera/camera';
import { Renderer } from './rendering/renderer';
import { Marker } from './gizmos/markers/gizmoMarker';
import type { IRaycaster as IRaycasterBase, IRaycastResult as IRaycastResultBase } from '../../shared';
/**
 * Type alias for an array of THREE.Intersection objects.
 */
export type ThreeIntersectionList = THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>>[];
export type RaycastableObject = Element3D | Marker;
export type IRaycastResult = IRaycastResultBase<RaycastableObject>;
export type IRaycaster = IRaycasterBase<RaycastableObject>;
export declare enum Layers {
    Default = 0,
    NoRaycast = 1
}
/**
 * A simple container for raycast results.
 */
export declare class RaycastResult implements IRaycastResult {
    object: Element3D | Marker | undefined;
    intersections: ThreeIntersectionList;
    firstHit: THREE.Intersection | undefined;
    get worldNormal(): THREE.Vector3;
    get worldPosition(): THREE.Vector3;
    constructor(intersections: ThreeIntersectionList, firstHit?: THREE.Intersection, object?: Element3D | Marker);
}
/**
 * Performs raycasting operations.
 */
export declare class Raycaster implements IRaycaster {
    private _camera;
    private _scene;
    private _renderer;
    private _raycaster;
    constructor(camera: Camera, scene: RenderScene, renderer: Renderer);
    /**
     * Performs a raycast from the camera using normalized screen coordinates.
     * Coordinates must be within [0, 1] for both x and y.
     */
    raycastFromScreen(position: THREE.Vector2): Promise<RaycastResult>;
    /**
     * Performs a raycast from the camera towards a specified world position.
     */
    raycastFromWorld(position: THREE.Vector3): Promise<RaycastResult>;
    private filterHits;
    /**
     * Processes the list of intersections to determine the first valid hit.
     * It first checks for a marker hit, then for a model object hit.
     */
    private processIntersections;
    /**
     * Extracts the core model object from a raycast hit.
     */
    private getVimObjectFromHit;
    /**
     * Creates a WebglRaycastResult from a list of intersections by processing the hits.
     */
    private createResultFromIntersections;
}
/**
 * Converts normalized screen coordinates (0-1 range) into Three.js NDC ([-1, 1] range).
 */
export declare function threeNDCFromVector2(position: THREE.Vector2): THREE.Vector2;
