|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.wisch.joystick.ffeffect.Effect
public abstract class Effect
The Class Effect. An Effect object represents an actual force feedback effect
to be played on an FFJoystick.
To play an effect you have to instantiate it with 'new', after that you can
set or change certain parameters.
- You can use the default constructor with no parameters, which creates an
effect with default settings. After that you can change its parameters using
setter methods.
- Or you can use the advanced constructor where you submit all properties at
initialization. You can change the properties using setter as well.
An Effect can be uploaded to several devices. It can also be altered to
update the effect on the device. That can be done even while the effect is
playing. To get to know how to upload, play, update, pause, stop or delete an
effect on the device see FFJoystick
.
FFJoystick
,
Direction
Field Summary | |
---|---|
static int |
EFFECT_CONSTANT
The constant EFFECT_CONSTANT: the object is a ConstantEffect (casting is safe). |
static int |
EFFECT_CUSTOM
The constant EFFECT_CUSTOM: the object is a CustomEffect (casting is safe). |
static int |
EFFECT_DAMPER
The constant EFFECT_DAMPER: the object is a DamperEffect (casting is safe). |
static int |
EFFECT_FRICTION
The constant EFFECT_FRICTION: the object is a FrictionEffect (casting is safe). |
static int |
EFFECT_INERTIA
The constant EFFECT_INERTIA: the object is a InertiaEffect (casting is safe). |
static int |
EFFECT_RAMP
The constant EFFECT_RAMP: the object is a RampEffect (casting is safe). |
static int |
EFFECT_SAWTOOHDOWN
The constant EFFECT_SAWTOOHDOWN: the object is a SawtoothDownEffect (casting is safe). |
static int |
EFFECT_SAWTOOTHUP
The constant EFFECT_SAWTOOTHUP: the object is a SawtoothUpEffect (casting is safe). |
static int |
EFFECT_SINE
The constant EFFECT_SINE: the object is a SineEffect (casting is safe). |
static int |
EFFECT_SPRING
The constant EFFECT_SPRING: the object is a SpringEffect (casting is safe). |
static int |
EFFECT_SQUARE
The constant EFFECT_SQUARE: the object is a SquareEffect (casting is safe). |
static int |
EFFECT_TRIANGLE
The constant EFFECT_TRIANGLE: the object is a TriangleEffect (casting is safe). |
static int |
INFINITE_LENGTH
The constant INFINITE_LENGTH: use this constant to set infinite length for an effect.. |
static int |
MAX_DELAY
The constant MAX_DELAY (60000 ms): 60 seconds - the maximum delay for starting an effect, also the maximum interval for buttons triggering effects. |
static int |
MAX_LENGTH
The constant MAX_LENGTH (360000000 ms): 100 hours - the maximum length for an effect. |
static int |
MAX_LEVEL
The constant MAX_LEVEL (32767): this is the maximum parameter value for some Effect properties: strength, level, ... |
static int |
MIN_LEVEL
The constant MIN_LEVEL (-32768): this is the minimum parameter value (to the negative side) for some Effect properties. |
static int |
NO_BUTTON
The constant NO_BUTTON: use this constant to set no trigger button for the effect. |
Method Summary | |
---|---|
int |
getButtonIndex()
Gets the index of the button which is set to trigger the Effect. |
int |
getButtonInterval()
Gets the currently set button interval. |
static Direction |
getDefaultDirection()
Gets the default direction. |
int |
getEffectDelay()
Gets the effect delay before the effect will be started. |
int |
getEffectLength()
Gets the effect length in ms. |
int |
getEffectType()
Gets the effect type. |
abstract java.lang.String |
getName()
Gets the effect type as a String. |
abstract int |
getStrength()
Gets the strength. |
void |
setButtonIndex(int buttonIndex)
Deprecated. trigger buttons are not supported on all operating systems. To stay platform independent you should trigger effects manually from events. See ControllerButtonEvent |
void |
setButtonInterval(int buttonInterval)
Deprecated. trigger buttons are not supported on all operating systems. To stay platform independent you should trigger effects manually from events. See ControllerButtonEvent |
static boolean |
setDefaultDirection(Direction direction)
Sets the default direction. |
void |
setEffectDelay(int effectDelay)
Sets the effect delay before the effect will be started. |
void |
setEffectLength(int effectLength)
Sets the effect length in ms. |
abstract void |
setStrength(int strength)
Sets the strength for an effect. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EFFECT_CONSTANT
public static final int EFFECT_SINE
public static final int EFFECT_SQUARE
public static final int EFFECT_TRIANGLE
public static final int EFFECT_SAWTOOTHUP
public static final int EFFECT_SAWTOOHDOWN
public static final int EFFECT_RAMP
public static final int EFFECT_SPRING
public static final int EFFECT_DAMPER
public static final int EFFECT_INERTIA
public static final int EFFECT_FRICTION
public static final int EFFECT_CUSTOM
public static final int NO_BUTTON
public static final int INFINITE_LENGTH
public static final int MAX_LEVEL
public static final int MIN_LEVEL
public static final int MAX_DELAY
public static final int MAX_LENGTH
Method Detail |
---|
public int getEffectType()
getName()
public int getEffectLength()
setEffectLength(int)
public void setEffectLength(int effectLength)
effectLength
- the new effect length (an int from 0 to MAX_LENGTH (360000000
ms ) or INFINITE_LENGTH)getEffectLength()
public int getEffectDelay()
setEffectDelay(int)
public void setEffectDelay(int effectDelay)
effectDelay
- the new effect delay (an int from 0 to MAX_DELAY (60000 ms))getEffectDelay()
public int getButtonIndex()
@Deprecated public void setButtonIndex(int buttonIndex)
ControllerButtonEvent
buttonIndex
- the new button indexgetButtonIndex()
,
Joystick.getButtonCount()
public int getButtonInterval()
setButtonInterval(int)
,
getButtonIndex()
@Deprecated public void setButtonInterval(int buttonInterval)
ControllerButtonEvent
buttonInterval
- the new button interval (an int from 0 to MAX_DELAY (60000 ms
))getButtonInterval()
,
setButtonIndex(int)
public abstract void setStrength(int strength)
strength
- the new strength (an int from 0 to MAX_LEVEL (32767))getStrength()
,
FFJoystick.getSimpleEffect()
public abstract int getStrength()
setStrength(int)
public abstract java.lang.String getName()
getEffectType()
public static Direction getDefaultDirection()
setDefaultDirection(Direction)
public static boolean setDefaultDirection(Direction direction)
direction
- the direction object
getDefaultDirection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |