SpatialGestureRecognizer.CaptureInteraction(SpatialInteraction) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Track all input events that occur as part of the specified interaction.
public:
virtual void CaptureInteraction(SpatialInteraction ^ interaction) = CaptureInteraction;
void CaptureInteraction(SpatialInteraction const& interaction);
public void CaptureInteraction(SpatialInteraction interaction);
function captureInteraction(interaction)
Public Sub CaptureInteraction (interaction As SpatialInteraction)
Parameters
- interaction
- SpatialInteraction
The interaction to capture from the InteractionDetected event.
Remarks
To use SpatialGestureRecognizer, handle the SpatialInteractionManager's InteractionDetected event. I that event handler, get the SpatialPointerPose (for that point in time) by calling TryGetPointerPose. Get the user's gaze ray from the SpatialPointerPose and intersect it with the holograms and surfaces in the user's surroundings (to determine what the user is intending to interact with). Then, pass the SpatialInteraction event argument to the target hologram's SpatialGestureRecognizer, using the CaptureInteraction method. The interaction is then interpreted according to the SpatialGestureSettings set when the recognizer was created.
Note
You can choose to have more than one SpatialGestureRecognizer capture the same interaction. In this case, events surface from both recognizers according to their SpatialGestureSettings. For example, when you have one hologram that supports Tap, logically contained within a hologram that supports scrolling with NavigationRailsY, and you want to support both gestures when gazing at the inner hologram.