Effect Structure

Language:

Used by the Inputdevice9Createeffect method to initialize a new Inputeffect object. It is also used by the InputeffectSetparameters and InputeffectGetparameters methods.

Definition

Visual Basic Public Structure Effect
C# public struct Effect 
C++ public value class Effect sealed 
JScript In JScript, you can use structures, but you cannot define your own.

Members Table

Field Description
ConditionStruct
Constant
CustomStruct
EnvelopeStruct
Periodic Contains type-specific information for effects that are marked as DIEFT_PERIODIC.The structure describes a periodic effect.A reference to a single Diperiodic structure for an effect is passed in the lpvTypeSpecificParams member of the Dieffect structure.
RampStruct
Method Description
Effect Initializes a new instance of the object.
GetAxes
GetDirection
SetAxes
SetDirection
ToString Obtains a string representation of the current instance.
Property Description
Duration The total duration of the effect, in microseconds. If this value is INFINITE, the effect has infinite duration. If an TermEnvelope has been applied to the effect, the TermAttack is applied, followed by an infinite TermSustain.
EffectType
Flags Flags associated with the effect. This value can be a combination of one or more of the following values:
Gain The gain to be applied to the effect, in the range from 0 through 10,000. The gain is a scaling factor applied to all magnitudes of the effect and its envelope.
SamplePeriod The period at which the device should play back the effect, in microseconds. A value of 0 indicates that the default playback sample rate should be used. If the device is not capable of playing back the effect at the specified rate, it chooses the supported rate that is closest to the requested value.Setting a custom DwSamplePeriod can be used for special effects. For example, playing a sine wave at an artificially large sample period results in a rougher texture.
StartDelay Time (in microseconds) that the device should wait after a InputeffectStart call before playing the effect. If this value is 0, effect playback begins immediately. This member is not present in versions prior to Microsoft® DirectX® 7.0.
TriggerButton The identifier or offset of the button to be used to trigger playback of the effect. The flags DIEFF_OBJECTIDS and DIEFF_OBJECTOFFSETS determine the semantics of the value. If this member is set to DIEB_NOTRIGGER, no trigger button is associated with the effect.
TriggerRepeatInterval The interval, in microseconds, between the end of one playback and the start of the next when the effect is triggered by a button press and the button is held down. Setting this value to INFINITE suppresses repetition. Support for trigger repeat for an effect is indicated by the presence of the DIEP_TRIGGERREPEATINTERVAL flag in the dwStaticParams member of the Dieffectinfo structure.
UsesEnvelope Used by the Dieffect structure to specify the optional TermEnvelope parameters for an effect. The TermSustain level for the envelope is represented by the dwMagnitude member of the Diperiodic structure and the lMagnitude member of the Diconstantforce structure. The sustain time is represented by dwDuration member of the Dieffect structure.

Structure Information

Namespace Microsoft.DirectX.DirectInput
Assembly Microsoft.DirectX.DirectInput (microsoft.directx.directinput.dll)
Strong Name Microsoft.DirectX.DirectInput,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492

Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center