public class OpenNI
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
OpenNI.DeviceConnectedListener |
The OpenNI.DeviceConnectedListener interface provides a means of registering for, and
responding to when a device is connected.
|
static interface |
OpenNI.DeviceDisconnectedListener |
The OpenNI.DeviceDisconnectedListener interface provides a means of registering for, and
responding to when a device is disconnected.
|
static interface |
OpenNI.DeviceStateChangedListener |
The OpenNI::DeviceStateChangedListener interface provides a means of registering for, and
responding to when a device's state is changed.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
TIMEOUT_FOREVER |
Constructor | Description |
---|---|
OpenNI() |
Modifier and Type | Method | Description |
---|---|---|
static void |
addDeviceConnectedListener(OpenNI.DeviceConnectedListener deviceListener) |
Add new device connected observer to OpenNI observers list
|
static void |
addDeviceDisconnectedListener(OpenNI.DeviceDisconnectedListener deviceListener) |
Add new device connected observer to OpenNI observers list
|
static void |
addDeviceStateChangedListener(OpenNI.DeviceStateChangedListener deviceListener) |
Add new device connected observer to OpenNI observers list
|
static java.util.List<DeviceInfo> |
enumerateDevices() |
Fills up an array of
DeviceInfo DeviceInfo objects with devices that are available. |
static java.lang.String |
getExtendedError() |
Retrieves the calling thread's last extended error information.
|
static Version |
getVersion() |
This function return current OpenNI version
|
static void |
initialize() |
Initialize the library.
|
static void |
removeDeviceConnectedListener(OpenNI.DeviceConnectedListener deviceListener) |
Remove device connected observer to OpenNI observers list
|
static void |
removeDeviceDisconnectedListener(OpenNI.DeviceDisconnectedListener deviceListener) |
Remove device connected observer to OpenNI observers list
|
static void |
removeDeviceStateChangedListener(OpenNI.DeviceStateChangedListener deviceListener) |
Remove device state changed observer from OpenNI observers list
|
static void |
shutdown() |
Stop using the library.
|
static int |
waitForAnyStream(java.util.List<VideoStream> streams,
int timeout) |
Wait for a new frame from any of the streams provided.
|
public static final int TIMEOUT_FOREVER
public static void initialize()
public static void shutdown()
public static Version getVersion()
public static java.lang.String getExtendedError()
public static java.util.List<DeviceInfo> enumerateDevices()
DeviceInfo
DeviceInfo objects with devices that are available.public static int waitForAnyStream(java.util.List<VideoStream> streams, int timeout) throws java.util.concurrent.TimeoutException
streams
- An list of streams to wait for.timeout
- A timeout before returning if no stream has new data. Default value is
TIMEOUT_FOREVER
.java.util.concurrent.TimeoutException
public static void addDeviceConnectedListener(OpenNI.DeviceConnectedListener deviceListener)
deviceListener
- object which implements DeviceConnectedListener.public static void removeDeviceConnectedListener(OpenNI.DeviceConnectedListener deviceListener)
deviceListener
- object which implements DeviceConnectedListener.public static void addDeviceDisconnectedListener(OpenNI.DeviceDisconnectedListener deviceListener)
deviceListener
- object which implements DeviceDisconnectedListener.public static void removeDeviceDisconnectedListener(OpenNI.DeviceDisconnectedListener deviceListener)
deviceListener
- object which implements DeviceDisconnectedListener.public static void addDeviceStateChangedListener(OpenNI.DeviceStateChangedListener deviceListener)
deviceListener
- object which implements DeviceConnectedListener.public static void removeDeviceStateChangedListener(OpenNI.DeviceStateChangedListener deviceListener)
deviceListener
- object which implements DeviceConnectedListener.