This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Plugins::Ultraleap Class

Header: #include <plugins/Unigine/Ultraleap/UnigineUltraleap.h>

Ultraleap Class

Enums

TRACKING_MODE#

Name说明/描 述
TRACKING_MODE_DESKTOP = 0The tracking mode optimised for desktop devices.
TRACKING_MODE_HMD = 1The tracking mode optimised for head-mounted devices.
TRACKING_MODE_SCREEN_TOP = 2The tracking mode optimised for screen top-mounted devices.
TRACKING_MODE_UNKNOWN = 3Tracking mode is not known.

CONNECTION_STATUS#

Name说明/描 述
CONNECTION_STATUS_NOT_CONNECTED = 0The connection is not open.
CONNECTION_STATUS_CONNECTED = 1The connection is open.
CONNECTION_STATUS_HANDSHAKE_INCOMPLETE = 2Opening the connection is underway, but not complete.
CONNECTION_STATUS_NOT_RUNNING = -1The connection could not be opened because the Ultraleap Tracking Service does not appear to be running.

OPTIMIZE_MODE#

Name说明/描 述
OPTIMIZE_MODE_DISABLED = 0Tracking optimization is disabled.
OPTIMIZE_MODE_AUTO = 1Tracking optimization is set to automatic.
OPTIMIZE_MODE_HMD = 2Tracking is optimized for head-mounted devices. The optimize HMD policy improves tracking in situations where the Ultraleap hardware is attached to a head-mounted display. This policy is not granted for devices that cannot be mounted to an HMD, such as Ultraleap controllers embedded in a laptop or keyboard.
OPTIMIZE_MODE_SCREEN_TOP = 3Tracking is optimized for screen-top devices.

Members


void setBackgroundUpdate ( bool update ) #

Sets the value indicating whether the application is allowed to receive frames in the background. By default your UNIGINE application stops rendering frames and updating its main window, when it window goes out of focus (e.g. user switches to another window). Setting the background update mode enables constant rendering regardless of whether the application window is focused or in the background.

Arguments

  • bool update - The window update mode: true for constantly repeating update cycle (i.e. the application is updated even if the window is hidden or out of focus); otherwise, false.

bool isBackgroundUpdate ( ) const#

Returns a value indicating whether the application is allowed to receive frames in the background.

Return value

true if the update cycle is constantly repeated (i.e. the application is updated even if the window is hidden or out of focus); otherwise, false.

void setStreamImages ( bool images ) #

Enables or disables streaming of images.

Arguments

  • bool images - true - to enable streaming of images; false - to disable it.

bool isStreamImages ( ) const#

Returns a value indicating if streaming of images is currently enabled.

Return value

true if streaming of images is currently enabled; otherwise, false.

void setPaused ( bool paused ) #

Pauses or resumes the Ultraleap service.

Arguments

  • bool paused - true - to pause the Ultraleap service; false - to resume it.

bool isPaused ( ) const#

Returns a value indicating if the Ultraleap service is currently paused.

Return value

true if the Ultraleap service is currently paused; otherwise, false.

void setAllowPauseResume ( bool resume ) #

Allows the application to pause and unpause the Ultraleap service.

Arguments

  • bool resume - true — to allow the application pause and unpause the Ultraleap service; otherwise, false.

bool isAllowPauseResume ( ) const#

Returns a value indicating if the application is allowed to pause and unpause the Ultraleap service.

Return value

true if the application is allowed to pause and unpause the Ultraleap service; otherwise, false.

void setOptimizeMode ( Ultraleap::OPTIMIZE_MODE mode ) #

Sets an optimization mode for tracking. Some policies can be denied if the user has disabled the feature on their Ultraleap control panel.

Arguments

Ultraleap::OPTIMIZE_MODE getOptimizeMode ( ) const#

Returns the current optimization mode set for tracking.

Return value

The optimization mode. One of the OPTIMIZE_MODE_* values.

void setTrackingMode ( Ultraleap::TRACKING_MODE mode ) #

Sets the tracking mode.

Arguments

Ultraleap::TRACKING_MODE getTrackingMode ( ) const#

Returns the current tracking mode.

Return value

The tracking mode. One of the TRACKING_MODE_* values.

void setTrackingInterpolation ( bool interpolation ) #

Toggles the tracking interpolation on and off.

Arguments

  • bool interpolation - true — to enable the tracking interpolation; otherwise, false.

bool isTrackingInterpolation ( ) const#

Returns the value indicating if the tracking interpolation is enabled.

Return value

true if the tracking interpolation is enabled; otherwise, false.

Ultraleap::CONNECTION_STATUS getConnectionStatus ( ) const#

Retuns the status of connection to the Ultraleap daemon/service.

Return value

The connection status. One of the CONNECTION_STATUS_* values.

bool isStatusLowFPSDetected ( ) const#

Returns the value indicating if the service cannot receive frames fast enough from the underlying hardware.

Return value

true if the service cannot receive frames fast enough from the underlying hardware; otherwise, false.

bool isStatusPoorPerformancePause ( ) const#

Returns the value indicating if the service has paused itself due to an insufficient frame rate from the hardware.

Return value

true if the service has paused itself due to an insufficient frame rate from the hardware; otherwise, false.

bool isStatusTrackingErrorUnknown ( ) const#

Returns the value indicating if the service has failed to start tracking due to unknown reasons.

Return value

true if the service has failed to start tracking due to unknown reasons; otherwise, false.

void setTrackingOffsetDefault ( const Math::Vec3& val ) #

Sets the default offset for the newly connected device. The Y value specifies the offset from the eyes to the frontal camera plane, in meters, and the Z value — the offset from the eye level up to the camera level, in meters. The X value should be set to 0. These settings can be used to match the physical position and orientation of the Tracking Hardware on a tracked device it is mounted on (such as a VR headset).

Arguments

  • const Math::Vec3& val - The the default offset for the newly connected device. The Y value specifies the offset from the eyes to the frontal camera plane, in meters, and the Z value — the offset from the eye level up to the camera level, in meters. The X value should be set to 0. These settings can be used to match the physical position and orientation of the Tracking Hardware on a tracked device it is mounted on (such as a VR headset).

Math::Vec3 getTrackingOffsetDefault ( ) const#

Returns the current virtual offset for the newly connected device. The Y value specifies the offset from the eyes to the frontal camera plane, in meters, and the Z value — the offset from the eye level up to the camera level, in meters.

Return value

The default offset for the newly connected device. The Y value specifies the offset from the eyes to the frontal camera plane, in meters, and the Z value — the offset from the eye level up to the camera level, in meters.

void setTransformModeOffsetDefault ( UltraleapDevice::TRANSFORM_MODE val ) #

Sets the offset to manually adjust the specified transform mode. These settings can be used to match the physical position and orientation of the Tracking Hardware on a tracked device it is mounted on (such as a VR headset).
Notice
If the HMD VARJO transform mode has been set, but AppVarjo hasn't been found, the transform mode is switched to MANUAL.

Arguments

UltraleapDevice::TRANSFORM_MODE getTransformModeOffsetDefault ( ) const#

Returns the default transform mode for the offset of a newly connected device.

Return value

The transform mode. One of the TRANSFORM_MODE* values.

int getNumDevices ( ) const#

Returns the total number of recognized devices.

Return value

The number of connected devices.

UltraleapDevice * getDevice ( int device_id ) const#

Returns the Ultraleap controller device from the list of recognized devices.

Arguments

  • int device_id - The ID of the Ultraleap controller device.

Return value

The Ultraleap controller device.

int getNumDevicesConnected ( ) const#

Returns the number of connected Ultraleap controller devices.

Return value

The number of connected Ultraleap controller devices.

UltraleapDevice * getDeviceConnected ( int device_id ) const#

Returns the Ultraleap controller device from the list of connected devices.

Arguments

  • int device_id - The ID of the Ultraleap controller device.

Return value

The Ultraleap controller device.

long long getLeapNow ( ) const#

Samples the universal clock used by the system to timestamp image and tracking frames. The returned counter value is given in microseconds since an epoch time. The clock used for the counter itself is implementation-defined, but generally speaking, it is global, monotonic, and makes use of the most accurate high-performance counter available on the system.

Return value

The time, in microseconds since an unspecified epoch.
Last update: 2023-06-23
Build: ()