PeriodicForceEffect
PeriodicForceEffect
PeriodicForceEffect
PeriodicForceEffect
Class
Definition
A force feedback effect which applies a varying force, defined by a waveform, along a vector.
public : sealed class PeriodicForceEffect : IForceFeedbackEffect, IPeriodicForceEffectpublic sealed class PeriodicForceEffect : IForceFeedbackEffect, IPeriodicForceEffectPublic NotInheritable Class PeriodicForceEffect Implements IForceFeedbackEffect, IPeriodicForceEffect// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Constructors
PeriodicForceEffect(PeriodicForceEffectKind) PeriodicForceEffect(PeriodicForceEffectKind) PeriodicForceEffect(PeriodicForceEffectKind) PeriodicForceEffect(PeriodicForceEffectKind)
Creates an instance of PeriodicForceEffect.
public : PeriodicForceEffect(PeriodicForceEffectKind effectKind)public PeriodicForceEffect(PeriodicForceEffectKind effectKind)Public Sub New(effectKind As PeriodicForceEffectKind)// You can use this method in JavaScript.
- effectKind
- PeriodicForceEffectKind PeriodicForceEffectKind PeriodicForceEffectKind PeriodicForceEffectKind
The type of effect to create.
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.
Kind Kind Kind Kind
The type of periodic force feedback effect.
public : PeriodicForceEffectKind Kind { get; }public PeriodicForceEffectKind Kind { get; }Public ReadOnly Property Kind As PeriodicForceEffectKind// You can use this property in JavaScript.
- Value
- PeriodicForceEffectKind PeriodicForceEffectKind PeriodicForceEffectKind PeriodicForceEffectKind
The type of periodic force feedback 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.
- Value
- ForceFeedbackEffectState ForceFeedbackEffectState ForceFeedbackEffectState ForceFeedbackEffectState
The current state of the force feedback effect.
Methods
SetParameters(Vector3, Single, Single, Single, TimeSpan) SetParameters(Vector3, Single, Single, Single, TimeSpan) SetParameters(Vector3, Single, Single, Single, TimeSpan) SetParameters(Vector3, Single, Single, Single, TimeSpan)
Sets the parameters for the force feedback effect.
public : void SetParameters(Vector3 vector, float frequency, float phase, float bias, TimeSpan duration)public void SetParameters(Vector3 vector, Single frequency, Single phase, Single bias, TimeSpan duration)Public Function SetParameters(vector As Vector3, frequency As Single, phase As Single, bias As Single, duration As TimeSpan) As void// You can use this method in JavaScript.
- 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.
- frequency
- float Single Single Single
The number of times the periodic wave occurs in one second.
- phase
- float Single Single Single
The phase offset from the origin of the periodic waveform, where 0.0 equals zero degrees of offset, and 1.0 equals 360 degrees of offset. For example, a phase value of 0.25 would correspond to a phase offset of 90 degrees.
- bias
- float Single Single Single
The adjustment to add to the magnitude after calculating the wave and before applying the ramp or gain. Range is between -1 and 1.
- duration
- TimeSpan TimeSpan TimeSpan TimeSpan
The duration of the effect.
SetParametersWithEnvelope(Vector3, Single, Single, Single, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Single, Single, Single, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Single, Single, Single, Single, Single, Single, TimeSpan, TimeSpan, TimeSpan, TimeSpan, UInt32) SetParametersWithEnvelope(Vector3, Single, Single, Single, 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 frequency, float phase, float bias, float attackGain, float sustainGain, float releaseGain, TimeSpan startDelay, TimeSpan attackDuration, TimeSpan sustainDuration, TimeSpan releaseDuration, unsigned int repeatCount)public void SetParametersWithEnvelope(Vector3 vector, Single frequency, Single phase, Single bias, Single attackGain, Single sustainGain, Single releaseGain, TimeSpan startDelay, TimeSpan attackDuration, TimeSpan sustainDuration, TimeSpan releaseDuration, UInt32 repeatCount)Public Function SetParametersWithEnvelope(vector As Vector3, frequency As Single, phase As Single, bias As Single, 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.
- 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.
- frequency
- float Single Single Single
The number of times the periodic wave occurs in one second.
- phase
- float Single Single Single
The phase offset from the origin of the periodic waveform, where 0.0 equals zero degrees of offset, and 1.0 equals 360 degrees of offset. For example, a phase value of 0.25 would correspond to a phase offset of 90 degrees.
- bias
- float Single Single Single
The adjustment to add to the magnitude after calculating the wave and before applying the ramp or gain. Range is between -1 and 1.
- 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.