public class Controllers
extends java.lang.Object
Constructor and Description |
---|
Controllers() |
Modifier and Type | Method and Description |
---|---|
static void |
clearEvents()
Clear any events stored for the controllers in this set
|
static void |
create()
Initialise the controllers collection
|
static void |
destroy()
Destroys any resources used by the controllers
|
static Controller |
getController(int index)
Get a controller from the collection
|
static int |
getControllerCount()
Retrieve a count of the number of controllers
|
static boolean |
getEventButtonState()
Gets the state of the button that generated the current event
|
static int |
getEventControlIndex()
Get the index of the control that caused the current event
|
static long |
getEventNanoseconds()
Get the timestamp assigned to the current event
|
static Controller |
getEventSource()
Get the source of the current event
|
static float |
getEventXAxisValue()
Get the value on an X axis of the current event
|
static float |
getEventYAxisValue()
Get the value on an Y axis of the current event
|
static boolean |
isCreated() |
static boolean |
isEventAxis()
Check if the current event was caused by a axis
|
static boolean |
isEventButton()
Check if the current event was caused by a button
|
static boolean |
isEventPovX()
Check if the current event was cause by the POV x-axis
|
static boolean |
isEventPovY()
Check if the current event was cause by the POV x-axis
|
static boolean |
isEventXAxis()
Check if the current event was caused by movement on the x-axis
|
static boolean |
isEventYAxis()
Check if the current event was caused by movement on the y-axis
|
static boolean |
next()
Move to the next event that has been stored.
|
static void |
poll()
Poll the controllers available.
|
public static void create() throws LWJGLException
LWJGLException
- Indicates a failure to initialise the controller library.public static Controller getController(int index)
index
- The index of the controller to retrievepublic static int getControllerCount()
public static void poll()
public static void clearEvents()
public static boolean next()
public static boolean isCreated()
public static void destroy()
public static Controller getEventSource()
public static int getEventControlIndex()
public static boolean isEventButton()
public static boolean isEventAxis()
public static boolean isEventXAxis()
public static boolean isEventYAxis()
public static boolean isEventPovX()
public static boolean isEventPovY()
public static long getEventNanoseconds()
public static boolean getEventButtonState()
public static float getEventXAxisValue()
public static float getEventYAxisValue()
Copyright © 2002-2009 lwjgl.org. All Rights Reserved.