import {BVH} from "../../../../core/bvh2/bvh3/BVH";
import {SurfacePoint3} from "../../../../core/geom/3d/SurfacePoint3";
import {System} from "../../../ecs/System";
import Engine from "../../../Engine";
import {ShadedGeometry} from "./ShadedGeometry.js";

export class ShadedGeometrySystem extends System<ShadedGeometry> {
    constructor(engine: Engine)

    readonly bvh: BVH

    raycastNearest(
        contact: SurfacePoint3,
        origin_x: number, origin_y: number, origin_z: number,
        direction_x: number, direction_y: number, direction_z: number,
        filter_function?: (entity: number, mesh: ShadedGeometry) => boolean,
        filter_function_context?: any
    ): { entity: number, mesh: ShadedGeometry } | undefined

    raycast(
        origin_x: number, origin_y: number, origin_z: number,
        direction_x: number, direction_y: number, direction_z: number,
        filter_function?: (entity: number, mesh: ShadedGeometry) => boolean,
        filter_function_context?: any
    ): { entity: number, mesh: ShadedGeometry, contact: SurfacePoint3 }[]

    queryOverlapFrustum(
        result: ArrayLike<number>,
        result_offset: number,
        planes: ArrayLike<number>
    ): number
}
