|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object at.wisch.joystick.ffeffect.Effect at.wisch.joystick.ffeffect.ExtendedEffect at.wisch.joystick.ffeffect.CustomEffect
@Deprecated public class CustomEffect
The Class CustomEffect. A custom force feedback effect is much like a
periodic effect, where the application can define it's exact shape.
If channels is one, the effect is rotated using the defined direction.
Otherwise it uses the samples in data for the different axes. In other words:
If there is only a single channel, the effect is rotated in the direction
specified by Direction. If there is more than one channel, rotation is not
applied. Note: Not all devices support rotation of custom effects.
The first channel is applied to the first axis associated with the effect,
the second to the second, and so on. If there are fewer channels than axes,
nothing is associated with the extra axes. If multiple channels are provided,
the data values are interleaved. For example, if channelsToUse is 3, the
first element of the array belongs to the first channel, the second to the
second, and the third to the third.
Field Summary |
---|
Fields inherited from class at.wisch.joystick.ffeffect.Effect |
---|
EFFECT_CONSTANT, EFFECT_CUSTOM, EFFECT_DAMPER, EFFECT_FRICTION, EFFECT_INERTIA, EFFECT_RAMP, EFFECT_SAWTOOHDOWN, EFFECT_SAWTOOTHUP, EFFECT_SINE, EFFECT_SPRING, EFFECT_SQUARE, EFFECT_TRIANGLE, INFINITE_LENGTH, MAX_DELAY, MAX_LENGTH, MAX_LEVEL, MIN_LEVEL, NO_BUTTON |
Constructor Summary | |
---|---|
CustomEffect()
Deprecated. Instantiates a new custom effect with default parameters, using 2 channels/axes. |
|
CustomEffect(Direction direction)
Deprecated. Instantiates a new custom effect with default parameters, using a Direction object. |
|
CustomEffect(Direction direction,
int effectLength,
int effectDelay,
int buttonIndex,
int buttonInterval,
int attackLength,
int fadeLength,
int attackLevel,
int fadeLevel,
int period,
int[] data)
Deprecated. Instantiates a new CustomEffect with the specified parameters. |
|
CustomEffect(int effectLength,
int effectDelay,
int buttonIndex,
int buttonInterval,
int attackLength,
int fadeLength,
int attackLevel,
int fadeLevel,
int period,
int channelsToUse,
int[] data)
Deprecated. Instantiates a new CustomEffect with the specified parameters. |
Method Summary | |
---|---|
int |
getChannelsToUse()
Deprecated. Gets the number of channels to use. |
int[] |
getData()
Deprecated. Gets the data array. |
java.lang.String |
getName()
Deprecated. Gets the effect type as a String. |
int |
getNumOfSamples()
Deprecated. Gets the number of samples. |
int |
getPeriod()
Deprecated. Gets the sample period in ms. |
int |
getStrength()
Deprecated. Gets the strength. |
void |
setPeriod(int period)
Deprecated. Sets the sample period in ms. |
void |
setSamples(int[] data)
Deprecated. Sets the data array. |
void |
setSamples(int[] data,
Direction dir)
Deprecated. Sets the data array. |
void |
setSamples(int[] data,
int channelsToUse)
Deprecated. Sets the data array and channelsToUse. |
void |
setStrength(int strength)
Deprecated. Sets the strength for an effect. |
Methods inherited from class at.wisch.joystick.ffeffect.ExtendedEffect |
---|
getAttackLength, getAttackLevel, getDirection, getFadeLength, getFadeLevel, setAttackLength, setAttackLevel, setDirection, setFadeLength, setFadeLevel |
Methods inherited from class at.wisch.joystick.ffeffect.Effect |
---|
getButtonIndex, getButtonInterval, getDefaultDirection, getEffectDelay, getEffectLength, getEffectType, setButtonIndex, setButtonInterval, setDefaultDirection, setEffectDelay, setEffectLength |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomEffect(Direction direction, int effectLength, int effectDelay, int buttonIndex, int buttonInterval, int attackLength, int fadeLength, int attackLevel, int fadeLevel, int period, int[] data)
direction
- a Direction objecteffectLength
- the effect length in ms (or INFINITE_LENGTH)effectDelay
- the delay before the effect starts in msbuttonIndex
- the trigger button index (or NO_BUTTON)buttonInterval
- the trigger button interval in msattackLength
- the attack length (fade-in) in msfadeLength
- the fade length (fade-out) in msattackLevel
- the level from where to start the fade-infadeLevel
- the level where the fade-out fades toperiod
- the sample period in msdata
- the data array (array size is numOfSamples, values are from 0
to MAX_LEVEL (32767))CustomEffect(int, int, int, int, int, int, int, int, int, int, int[])
public CustomEffect(int effectLength, int effectDelay, int buttonIndex, int buttonInterval, int attackLength, int fadeLength, int attackLevel, int fadeLevel, int period, int channelsToUse, int[] data)
effectLength
- the effect length in ms (or INFINITE_LENGTH)effectDelay
- the delay before the effect starts in msbuttonIndex
- the trigger button index (or NO_BUTTON)buttonInterval
- the trigger button interval in msattackLength
- the attack length (fade-in) in msfadeLength
- the fade length (fade-out) in msattackLevel
- the level from where to start the fade-infadeLevel
- the level where the fade-out fades toperiod
- the sample period in mschannelsToUse
- the number of channels/axes to use (2 or more)data
- the data array (array size is channelsToUse * numOfSamples,
values are from 0 to MAX_LEVEL (32767))CustomEffect(Direction, int, int, int, int, int, int, int, int, int, int[])
public CustomEffect()
CustomEffect(Direction)
public CustomEffect(Direction direction)
direction
- a Direction objectCustomEffect()
Method Detail |
---|
public int getPeriod()
setPeriod(int)
public void setPeriod(int period)
period
- the new sample period in ms (value from 0 to MAX_DELAY (60000))getPeriod()
public int getChannelsToUse()
getNumOfSamples()
,
setSamples(int[], int)
public int getNumOfSamples()
setSamples(int[], int)
,
setSamples(int[], Direction)
,
setSamples(int[])
public int[] getData()
setSamples(int[], int)
,
setSamples(int[], Direction)
,
setSamples(int[])
public void setSamples(int[] data, int channelsToUse)
data
- the data (array size is channelsToUse * numOfSamples,
values are from 0 to MAX_LEVEL (32767))channelsToUse
- the channels to use (value from 1 to 255)setSamples(int[], Direction)
,
setSamples(int[])
,
getData()
,
getChannelsToUse()
,
getNumOfSamples()
public void setSamples(int[] data)
data
- the data array (values are from 0
to MAX_LEVEL (32767))setSamples(int[], Direction)
,
setSamples(int[], int)
,
getData()
,
ExtendedEffect.getDirection()
public void setSamples(int[] data, Direction dir)
data
- the data array (values are from 0
to MAX_LEVEL (32767))dir
- a Direction objectsetSamples(int[])
,
setSamples(int[], int)
,
getData()
,
ExtendedEffect.getDirection()
public int getStrength()
getStrength
in class Effect
getData()
public void setStrength(int strength)
Effect
setStrength
in class Effect
strength
- the new strength (an int from 0 to MAX_LEVEL (32767))Effect.getStrength()
,
FFJoystick.getSimpleEffect()
public java.lang.String getName()
getName
in class Effect
Effect.getEffectType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |