RampForceEffect RampForceEffect RampForceEffect RampForceEffect Class

Definition

A force feedback effect which applies a linearly increasing or decreasing force along a vector.

public : sealed class RampForceEffect : IForceFeedbackEffect, IRampForceEffectpublic sealed class RampForceEffect : IForceFeedbackEffect, IRampForceEffectPublic NotInheritable Class RampForceEffect Implements IForceFeedbackEffect, IRampForceEffect// 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

RampForceEffect() RampForceEffect() RampForceEffect() RampForceEffect()

Creates an instance of RampForceEffect.

public : RampForceEffect()public RampForceEffect()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 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, Vector3, TimeSpan) SetParameters(Vector3, Vector3, TimeSpan) SetParameters(Vector3, Vector3, TimeSpan) SetParameters(Vector3, Vector3, TimeSpan)

Sets the parameters for the ramp force feedback effect.

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

A vector describing the direction and magnitude of the effect on each axis when the effect is starting. 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.

endVector
Vector3 Vector3 Vector3 Vector3

A vector describing the direction and magnitude of the effect on each axis when the effect is ending. 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, Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Vector3, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, 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 startVector, Vector3 endVector, float attackGain, float sustainGain, float releaseGain, TimeSpan startDelay, TimeSpan attackDuration, TimeSpan sustainDuration, TimeSpan releaseDuration, unsigned int repeatCount)public void SetParametersWithEnvelope(Vector3 startVector, Vector3 endVector, Single attackGain, Single sustainGain, Single releaseGain, TimeSpan startDelay, TimeSpan attackDuration, TimeSpan sustainDuration, TimeSpan releaseDuration, UInt32 repeatCount)Public Function SetParametersWithEnvelope(startVector As Vector3, endVector 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
startVector
Vector3 Vector3 Vector3 Vector3

The start vector of the effect.

endVector
Vector3 Vector3 Vector3 Vector3

The end vector of the effect.

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 effect.

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