|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openni.OpenNI
public class OpenNI
The OpenNI class is a static entry point to the library. It is used by every OpenNI 2.0 application to initialize the SDK and drivers to enable creation of valid device objects. It also defines a listener class and events that enable for event driven notification of device connection, device disconnection, and device configuration changes. In addition, it gives access to SDK version information and provides a function that allows you to wait for data to become available on any one of a list of streams (as opposed to waiting for data on one specific stream with functions provided by the VideoStream class)
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
static int |
TIMEOUT_FOREVER
|
Constructor Summary | |
---|---|
OpenNI()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TIMEOUT_FOREVER
Constructor Detail |
---|
public OpenNI()
Method Detail |
---|
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.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |