import type { Plane } from './plane'; import { Ray } from './ray'; import type { RayCasterCamera, RayCastResult } from './types'; import type { Vector2 } from './vector2'; /** * 射线投射器,由屏幕坐标与相机参数构建射线并进行平面求交。 */ export declare class RayCaster { ray: Ray; /** * 构造射线投射器。 * @param ray 初始射线,默认为新建射线 */ constructor(ray?: Ray); /** * 由屏幕坐标与相机参数构建投射射线。 * @param coords 屏幕坐标(归一化) * @param camera 相机参数 * @returns 当前实例(链式调用) */ setFromCamera(coords: Vector2, camera: RayCasterCamera): this; /** * 将当前射线与平面求交。 * @param plane 目标平面 * @returns 相交结果,不相交时返回 undefined */ rayCastPlane(plane: Plane): RayCastResult | undefined; }