Interface IEntityQueryModule

interface IEntityQueryModule {
    getQueryRaycaster: (() => Raycaster);
    getRayByScreenPos: ((x, y, camera?) => Ray);
    queryEntitiesByBox: ((startPoint, endPoint, option?, deep?) => InteractiveObject[]);
    queryEntitiesByCamera: ((option?) => InteractiveObject);
    queryEntitiesByRaycast: ((ray, option?) => InteractiveObject);
    queryEntitiesByScreenPos: ((x, y, option?) => InteractiveObject);
}

Implemented by

Properties

getQueryRaycaster: (() => Raycaster)

获取查询的射线对象

Type declaration

    • (): Raycaster
    • 获取查询的射线对象

      Returns Raycaster

getRayByScreenPos: ((x, y, camera?) => Ray)

通过屏幕坐标获取射线

Type declaration

    • (x, y, camera?): Ray
    • 通过屏幕坐标获取射线

      Parameters

      • x: number
      • y: number
      • Optional camera: Camera

      Returns Ray

queryEntitiesByBox: ((startPoint, endPoint, option?, deep?) => InteractiveObject[])

通过框选查询实体

Type declaration

queryEntitiesByCamera: ((option?) => InteractiveObject)

通过相机查询实体

Type declaration

queryEntitiesByRaycast: ((ray, option?) => InteractiveObject)

通过射线查询实体

Type declaration

queryEntitiesByScreenPos: ((x, y, option?) => InteractiveObject)

通过屏幕像素坐标查询实体

Type declaration