|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Control
Control represents an internal variable in a Robot. This can be attached to
just about anything with nearly any purpose. Using the setValue(float)
method will affect the Robot's state.
API Stability: Alpha.
Field Summary | |
---|---|
static int |
TYPE_AXIS
Type ID for an axis that varies in value from -1 to 1. |
static int |
TYPE_BUTTON
Type ID for a momentary push button that is on while pressed. |
static int |
TYPE_SLIDER
Type ID for an axis with a range of 0 to 1. |
static int |
TYPE_TOGGLE
Type ID for a toggle button that toggles when pressed. |
Method Summary | |
---|---|
java.lang.String |
getName()
Provides the human-readable name of this control. |
int |
getType()
Provides a way to identify how this control should be treated and what range of input values it will expect. |
float |
getValue()
Provides the current value of this control. |
void |
setValue(float val)
Sets the value of this control. |
Field Detail |
---|
static final int TYPE_AXIS
static final int TYPE_SLIDER
static final int TYPE_BUTTON
static final int TYPE_TOGGLE
Method Detail |
---|
java.lang.String getName()
void setValue(float val)
val
- a float value from negetive one to one; zero indicates the
control is completely off and one indicates it is completely on. The
sign of this value indicates direction. Any value outside this range
should be clamped (less than negetive one becomes negetive one; greater
than one becomes one). For buttons, they should round all states to
either zero or one.float getValue()
int getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |