Skip to content

scene.interaction

Pointer hits, clicks, hover state, and dragging.

6 functions / 18 types

Index

FunctionDescription
ClicksReport the clicks on the viewport since the last time this action was called.
GetInteractableGet whether a scene object is currently interactable.
HoversReport the hovers on the viewport since the last time this action was called.
IsDraggingCheck if a scene object is being actively dragged
SetDraggableSet a scene object as draggable and poll for recent changes This will also make it interactible.
SetInteractableSet whether a scene object is interactable.
TypeDescription
BlockModelHitDataKind-specific data about hitting a block model
ClickOne click on a scene node, as reported by Clicks.
ClicksReport the clicks on the viewport since the last time this action was called.
ClicksResponse
GetInteractableGet whether a scene object is currently interactable.
GetInteractableResponse
HitOne scene node under the cursor, as reported by Hovers.
HitDataKind-specific data about hitting an object
HoversReport the hovers on the viewport since the last time this action was called.
HoversResponse
IsDraggingCheck if a scene object is being actively dragged
IsDraggingResponse
MeshHitDataKind-specific data about hitting a mesh
PointCloudHitDataKind-specific data about hitting a point cloud
PolylineHitDataKind-specific data about hitting a polyline
SetDraggableSet a scene object as draggable and poll for recent changes This will also make it interactible.
SetInteractableSet whether a scene object is interactable.
ShapeHitDataKind-specific data about hitting a shape

Clicks

RPC

Clicks(request: scene.interaction.Clicks) -> scene.interaction.ClicksResponse

Report 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.GetInteractableResponse

Get 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.HoversResponse

Report 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.IsDraggingResponse

Check 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.Empty

Set 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.Empty

Set 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