import type { Composition, Region } from '@galacean/effects'; import type { Ray, Matrix4 } from '../runtime/math'; import { Vector3 } from '../runtime/math'; import type { ModelItemBounding } from '../index'; /** * 带旋转的射线与包围盒求交 * @param ray - 射线 * @param matrixData - 矩阵 * @param bounding - 包围盒 * @returns 交点列表或者 undefined */ declare function RayIntersectsBoxWithRotation(ray: Ray, matrixData: Matrix4, bounding: ModelItemBounding): Vector3[] | undefined; /** * 射线与包围盒求交 * @param ro - 射线原点 * @param rd - 射线方向 * @param bmin - 包围盒左下点 * @param bmax - 包围盒右上点 * @returns 交点参数或者 undefined */ declare function RayBoxTesting(ro: Vector3, rd: Vector3, bmin: Vector3, bmax: Vector3): number | undefined; /** * 射线与三角形求交 * @param ro - 射线原点 * @param rd - 射线方向 * @param a - 三角形点 * @param b - 三角形点 * @param c - 三角形点 * @param backfaceCulling - 是否剔除背面 * @returns 交点参数或者 undefined */ declare function RayTriangleTesting(ro: Vector3, rd: Vector3, a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean): number | undefined; /** * 合成点击测试,支持获取多个交点,并按照远近排序 * @param composition - 合成 * @param x - 点击 x 坐标 * @param y - 点击 y 坐标 * @returns 点击信息列表 */ declare function CompositionHitTest(composition: Composition, x: number, y: number): Region[]; /** * 切换 3D Mesh 元素的包围盒显示标志 * @param composition - 合成 * @param itemId - 元素 id */ declare function ToggleItemBounding(composition: Composition, itemId: string): void; export { RayIntersectsBoxWithRotation, RayBoxTesting, RayTriangleTesting, ToggleItemBounding, CompositionHitTest };