public class OpenNI
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
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.
|
限定符和类型 | 字段和说明 |
---|---|
static int |
TIMEOUT_FOREVER |
构造器和说明 |
---|
OpenNI() |
限定符和类型 | 方法和说明 |
---|---|
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 |
setLogAndroidOutput(boolean enabled)
Configures if log entries will be printed to file
|
static void |
setLogConsoleOutput(boolean enabled)
Configures if log entries will be printed to console
|
static void |
setLogFileOutput(boolean enabled)
Configures if log entries will be printed to file
|
static void |
setLogMinSeverity(int minSeverity)
Set minimum severity for log entries
|
static void |
setLogOutputFolder(java.lang.String path)
Set the output folder for log files (if enabled)
|
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.public static void setLogMinSeverity(int minSeverity)
minSeverity
- Minimum severity to outputpublic static void setLogConsoleOutput(boolean enabled)
enabled
- Whether log entries should be printed to console or not.public static void setLogFileOutput(boolean enabled)
enabled
- Whether log entries should be printed to file or not.public static void setLogOutputFolder(java.lang.String path)
path
- Path to write log files to.public static void setLogAndroidOutput(boolean enabled)
enabled
- Whether log entries should be printed to android log or not.