I want to implement picking entities from a scene, but have the scene outline the entity on mouseover, then on click add to a selection set (and highlight). I’ve worked out how to do these things independently, but not all together.
The geometry of the HandleOperator is highlighted during a mouse move (hover) operation. As a helpful reference, we provide the source code as part of the Communicator package which you can find in the directory HOOPS_Communicator_2024.7.0\web_viewer\deprecated\typescript\operators\HandleOperator.ts.
The function of interest is:
public async onMouseMove(event: Event.MouseInputEvent): Promise<void> {
super.onMouseMove(event);
if (this._draggingHandle && this._activeHandleNodeId !== null) {
this._onHandleDrag();
} else {
// If we are not dragging, highlight the handles as we mouse over them.
const selection = await this._viewer.view.pickFromPoint(
event.getPosition(),
this._pickConfig,
);
await this._highlightHandle(selection);
}
}
So if I understand correctly there is no way to have multiple selection managers, and so I must effectively implement my own and colour the model manually?