scene.interaction
Pointer hits, clicks, hover state, and dragging.
6 functions / 18 types
Index
| Function | Description |
|---|---|
| Clicks | Report the clicks on the viewport since the last time this action was called. |
| GetInteractable | Get whether a scene object is currently interactable. |
| Hovers | Report the hovers on the viewport since the last time this action was called. |
| IsDragging | Check if a scene object is being actively dragged |
| SetDraggable | Set a scene object as draggable and poll for recent changes This will also make it interactible. |
| SetInteractable | Set whether a scene object is interactable. |
| Type | Description |
|---|---|
| BlockModelHitData | Kind-specific data about hitting a block model |
| Click | One click on a scene node, as reported by Clicks. |
| Clicks | Report the clicks on the viewport since the last time this action was called. |
| ClicksResponse | |
| GetInteractable | Get whether a scene object is currently interactable. |
| GetInteractableResponse | |
| Hit | One scene node under the cursor, as reported by Hovers. |
| HitData | Kind-specific data about hitting an object |
| Hovers | Report the hovers on the viewport since the last time this action was called. |
| HoversResponse | |
| IsDragging | Check if a scene object is being actively dragged |
| IsDraggingResponse | |
| MeshHitData | Kind-specific data about hitting a mesh |
| PointCloudHitData | Kind-specific data about hitting a point cloud |
| PolylineHitData | Kind-specific data about hitting a polyline |
| SetDraggable | Set a scene object as draggable and poll for recent changes This will also make it interactible. |
| SetInteractable | Set whether a scene object is interactable. |
| ShapeHitData | Kind-specific data about hitting a shape |
Clicks
RPC
Clicks(request: scene.interaction.Clicks) -> scene.interaction.ClicksResponseReport the clicks on the viewport since the last time this action was called.
Service method: spatialengine.v1.scene.interaction.SceneInteraction.Clicks.
Returns scene.interaction.ClicksResponse.
GetInteractable
RPC
GetInteractable(request: scene.interaction.GetInteractable) -> scene.interaction.GetInteractableResponseGet whether a scene object is currently interactable.
Service method: spatialengine.v1.scene.interaction.SceneInteraction.GetInteractable.
Returns scene.interaction.GetInteractableResponse.
node : scene.Node
Hovers
RPC
Hovers(request: scene.interaction.Hovers) -> scene.interaction.HoversResponseReport the hovers on the viewport since the last time this action was called.
Service method: spatialengine.v1.scene.interaction.SceneInteraction.Hovers.
Returns scene.interaction.HoversResponse.
IsDragging
RPC
IsDragging(request: scene.interaction.IsDragging) -> scene.interaction.IsDraggingResponseCheck if a scene object is being actively dragged
Service method: spatialengine.v1.scene.interaction.SceneInteraction.IsDragging.
Returns scene.interaction.IsDraggingResponse.
node : scene.Node
The NodeSchema of the shape to make draggable.
SetDraggable
RPC
SetDraggable(request: scene.interaction.SetDraggable) -> google.protobuf.EmptySet a scene object as draggable and poll for recent changes This will also make it interactible.
Service method: spatialengine.v1.scene.interaction.SceneInteraction.SetDraggable.
Returns google.protobuf.Empty.
node : scene.Node
The NodeSchema of the shape to make draggable.
drag_kind optional : scene.DragKind
How the drag moves the shape. Absent leaves it dragging in the plane facing the camera.
SetInteractable
RPC
SetInteractable(request: scene.interaction.SetInteractable) -> google.protobuf.EmptySet whether a scene object is interactable.
Service method: spatialengine.v1.scene.interaction.SceneInteraction.SetInteractable.
Returns google.protobuf.Empty.
node : scene.Node
interactible optional : bool
If unset, this will default to true.
BlockModelHitData
Message
Kind-specific data about hitting a block model
leaf : scene.LeafDescription
The element to pass to the component’s inspect_leaf query.
Click
Message
One click on a scene node, as reported by Clicks.
mouse_button : uint32
Which mouse button: 0 primary, 1 secondary, 2 middle.
hit : scene.interaction.Hit
The underlying hit.
Clicks
Message
Report the clicks on the viewport since the last time this action was called.
ClicksResponse
Message
value optional : list[scene.interaction.Click]
GetInteractable
Message
Get whether a scene object is currently interactable.
node : scene.Node
GetInteractableResponse
Message
value optional : bool
Hit
Message
One scene node under the cursor, as reported by Hovers.
position : math.Vec3
World position of the point under the cursor.
node : scene.Node
The scene node under the cursor.
info : scene.interaction.HitData
Additional data specific to the kind of scene object hit
HitData
Message
Kind-specific data about hitting an object
Choose one of: block_model, point_cloud, mesh, polyline, shape.
block_model optional : scene.interaction.BlockModelHitData
Kind-specific data about hitting a block model
point_cloud optional : scene.interaction.PointCloudHitData
Kind-specific data about hitting a point cloud
mesh optional : scene.interaction.MeshHitData
Kind-specific data about hitting a mesh
polyline optional : scene.interaction.PolylineHitData
Kind-specific data about hitting a polyline
shape optional : scene.interaction.ShapeHitData
Kind-specific data about hitting a shape
Hovers
Message
Report the hovers on the viewport since the last time this action was called.
HoversResponse
Message
value optional : list[scene.interaction.Hit]
IsDragging
Message
Check if a scene object is being actively dragged
node : scene.Node
The NodeSchema of the shape to make draggable.
IsDraggingResponse
Message
value optional : bool
MeshHitData
Message
Kind-specific data about hitting a mesh
PointCloudHitData
Message
Kind-specific data about hitting a point cloud
leaf : scene.LeafDescription
The element to pass to the component’s inspect_leaf query.
PolylineHitData
Message
Kind-specific data about hitting a polyline
SetDraggable
Message
Set a scene object as draggable and poll for recent changes This will also make it interactible.
node : scene.Node
The NodeSchema of the shape to make draggable.
drag_kind optional : scene.DragKind
How the drag moves the shape. Absent leaves it dragging in the plane facing the camera.
SetInteractable
Message
Set whether a scene object is interactable.
node : scene.Node
interactible optional : bool
If unset, this will default to true.
ShapeHitData
Message
Kind-specific data about hitting a shape