Dela via


SimpleHapticsController Class

Definition

Provides access to a single haptic input device that can be used to enumerate the haptic waveforms supported by the associated input device and trigger a specific haptic response.

public ref class SimpleHapticsController sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SimpleHapticsController final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SimpleHapticsController
Public NotInheritable Class SimpleHapticsController
Inheritance
Object Platform::Object IInspectable SimpleHapticsController
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Examples

The following fully functional samples demonstrate haptic features across various devices.

Pen haptics

See the Pen haptics sample for working examples of the following functionality:

RadialController haptics

See the RadialController for examples of how to use haptics with RadialController devices such as the Surface Dial.

Mixed reality controller haptics

See the Spatial interaction source sample for an example of how to use haptics with Six Degree of Freedom (6DOF) Controllers on Windows Mixed Reality Desktop.

Properties

Id

Gets the identifier for the haptic input device.

IsIntensitySupported

Gets whether the haptic input device supports feedback intensity.

IsPlayCountSupported

Gets whether the haptic input device supports feedback counts.

IsPlayDurationSupported

Gets whether the haptic input device supports feedback duration.

IsReplayPauseIntervalSupported

Gets whether the haptic input device supports pause intervals between feedback cycles.

SupportedFeedback

Gets the types of feedback supported by the haptic input device.

Methods

SendHapticFeedback(SimpleHapticsControllerFeedback, Double)

Start haptic feedback by the input device with the specified intensity.

SendHapticFeedback(SimpleHapticsControllerFeedback)

Start haptic feedback by the input device.

SendHapticFeedbackForDuration(SimpleHapticsControllerFeedback, Double, TimeSpan)

Start haptic feedback by the input device and continue for the specified amount of time.

SendHapticFeedbackForPlayCount(SimpleHapticsControllerFeedback, Double, Int32, TimeSpan)

Start haptic feedback by the input device and repeat for the specified number of times.

StopFeedback()

Terminates haptic feedback by the input device.

Applies to

See also