ConstantForceEffect ConstantForceEffect ConstantForceEffect ConstantForceEffect Class

Definition

A force feedback effect which applies a constant force along a vector.

public : sealed class ConstantForceEffect : IConstantForceEffect, IForceFeedbackEffectpublic sealed class ConstantForceEffect : IConstantForceEffect, IForceFeedbackEffectPublic NotInheritable Class ConstantForceEffect Implements IConstantForceEffect, IForceFeedbackEffect// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Constructors

ConstantForceEffect() ConstantForceEffect() ConstantForceEffect() ConstantForceEffect()

Creates an instance of ConstantForceEffect.

public : ConstantForceEffect()public ConstantForceEffect()Public Sub New()// You can use this method in JavaScript.

Properties

Gain Gain Gain Gain

Specifies the percentage by which to reduce the force of the effect.

public : double Gain { get; set; }public double Gain { get; set; }Public ReadWrite Property Gain As double// You can use this property in JavaScript.
Value
double double double double

Specifies the percentage by which to reduce the force of the effect.

State State State State

The current state of the force feedback effect.

public : ForceFeedbackEffectState State { get; }public ForceFeedbackEffectState State { get; }Public ReadOnly Property State As ForceFeedbackEffectState// You can use this property in JavaScript.

Methods

SetParameters(Vector3, TimeSpan) SetParameters(Vector3, TimeSpan) SetParameters(Vector3, TimeSpan) SetParameters(Vector3, TimeSpan)

Sets the parameters for the constant force feedback effect.

public : void SetParameters(Vector3 vector, TimeSpan duration)public void SetParameters(Vector3 vector, TimeSpan duration)Public Function SetParameters(vector As Vector3, duration As TimeSpan) As void// You can use this method in JavaScript.
Parameters
vector
Vector3 Vector3 Vector3 Vector3

A vector describing the direction and magnitude of the effect on each axis. Each individual axis has a range of -1.0 to 1.0 and is independent of the other axes. Specifying a negative value for an axis reverses the input values from the axis.

duration
TimeSpan TimeSpan TimeSpan TimeSpan

The duration of the effect.

SetParametersWithEnvelope(Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32)

Sets the parameters for the effect and sets an envelope for the effect.

public : void SetParametersWithEnvelope(Vector3 vector, float attackGain, float sustainGain, float releaseGain, TimeSpan startDelay, TimeSpan attackDuration, TimeSpan sustainDuration, TimeSpan releaseDuration, unsigned int repeatCount)public void SetParametersWithEnvelope(Vector3 vector, Single attackGain, Single sustainGain, Single releaseGain, TimeSpan startDelay, TimeSpan attackDuration, TimeSpan sustainDuration, TimeSpan releaseDuration, UInt32 repeatCount)Public Function SetParametersWithEnvelope(vector As Vector3, attackGain As Single, sustainGain As Single, releaseGain As Single, startDelay As TimeSpan, attackDuration As TimeSpan, sustainDuration As TimeSpan, releaseDuration As TimeSpan, repeatCount As UInt32) As void// You can use this method in JavaScript.
Parameters
vector
Vector3 Vector3 Vector3 Vector3

A vector describing the direction and magnitude of the effect on each axis. Each individual axis has a range of -1.0 to 1.0 and is independent of the other axes. Specifying a negative value for an axis reverses the input values from the axis.

attackGain
float Single Single Single

Percentage by which to reduce the strength of the effect when it is ramping up.

sustainGain
float Single Single Single

Percentage by which to reduce the strength of the effect when it is sustaining.

releaseGain
float Single Single Single

Percentage by which to reduce the strength of the effect when it is ramping down.

startDelay
TimeSpan TimeSpan TimeSpan TimeSpan

Time to delay the effect before starting.

attackDuration
TimeSpan TimeSpan TimeSpan TimeSpan

Time to ramp up to the effect's full strength.

sustainDuration
TimeSpan TimeSpan TimeSpan TimeSpan

Time to maintain the effect at full strength.

releaseDuration
TimeSpan TimeSpan TimeSpan TimeSpan

Time to ramp down from full strength to zero.

repeatCount
unsigned int UInt32 UInt32 UInt32

The number of times to repeat the effect.

Start() Start() Start() Start()

Starts the force feedback effect.

public : void Start()public void Start()Public Function Start() As void// You can use this method in JavaScript.

Stop() Stop() Stop() Stop()

Stops the force feedback effect.

public : void Stop()public void Stop()Public Function Stop() As void// You can use this method in JavaScript.