new SpatialQuery3D(scene)
GPU space query class.
| Name | Type | Description |
|---|---|---|
scene |
Scene |
Scenarios for GPU space queries. |
Throws:
-
We need a scene.
- Type
- DeveloperError
Members
-
fillColorColor
-
Get or set the fill color of the query object in RGBA format.
-
fillStyleFillStyle
-
Get or set the fill mode of the query object.
-
geometryGeometry3D
-
Retrieve or set a single geometric model object for querying (compatible with older versions).
-
layersLayers
-
Get or set the queried layer.
-
outlineColorColor
-
Get or set the border color of the query object.
-
positionModePositionMode
-
Retrieve or set the object position mode during query, which refers to the positional relationship between the query object and the model object, including separation, intersection, and inclusion.
Methods
-
addGeometry(geometry)
-
动态添加单个查询几何体
Name Type Description geometryGeometry3D 要添加的几何模型对象
-
build()
-
Perform GPU space queries and analysis.
-
clear()
-
Clear objects but do not destroy them.
-
destroy()
-
Destruction of objects.
-
getQueryIDs(){Array}
-
Retrieve all queried IDs.
Returns:
Type Description Array ids -
getVisibleInViewport(index){boolean}
-
Obtain the visibility of spatial query results in the corresponding viewport.
Name Type Description indexnumber Index
Throws:
-
Index is between 0 and 8
- Type
- DeveloperError
Returns:
Type Description boolean Visible visibility -
-
removeGeometry(geometry){boolean}
-
Remove the specified geometry.
Name Type Description geometryGeometry3D | Primitive Geometric object to be removed
Returns:
Type Description boolean If the removal is successful, return true; otherwise, return false -
setVisibleInViewport(index, visible)
-
Set the visibility of spatial query results in the corresponding viewport
Name Type Description indexnumber Index
visibleboolean visibility
Throws:
-
Index is between 0 and 8
- Type
- DeveloperError
-