OSVR Client Application Design

50 %
50 %
Information about OSVR Client Application Design

Published on September 8, 2015

Author: rpavlik

Source: slideshare.net

1. OSVR Client API Overview Ryan A. Pavlik, PhD Sensics, Inc. July-2015

2. Links ● Dev Portal: http://osvr.github.io/build-with/#building-an-app-with-c++-or-c ● Docs on “Writing a Client Application” ○ http://resource.osvr.com/docs/OSVR-Core/md_TopicWritingClientApplication. html ● Example state-based tracker client: ○ Cross-referenced source in Doxygen: http://resource.osvr.com/docs/OSVR- Core/TrackerState_8cpp_source.html ○ https://github.com/OSVR/OSVR- Core/blob/master/examples/clients/TrackerState.cpp ● Example callback-based button client: ○ Cross-referenced source in Doxygen: http://resource.osvr.com/docs/OSVR- Core/ButtonCallback_8cpp_source.html ○ https://github.com/OSVR/OSVR- Core/blob/master/examples/clients/ButtonCallback.cpp

3. Basic Concepts ● Direct API is C, for ABI stability and FFI compatibility ● Recommended native code interface is included C++ header-only wrappers ● .NET/Mono interface: Managed-OSVR ○ Used for Unity support ● All share a similar design, and are generally modeled on the C++ API.

4. Client Context Object ● Pass reverse domain name “app id”. ● No implicit global state: on startup, get a context object, on shutdown, close it. ● Client context handles the attempted connection to the OSVR server. ● Does not spawn its own thread - call update on the client context to transfer control and process messages.

5. Interface Objects (handles) ● Request using a “semantic path” in the path tree ○ example: /me/head ○ If no applicable path exists, just add an alias using the server config. ● Obtained from client context ● If not freed before client context is closed, freed automatically.

6. Two Ways of Accessing Data ● Most data accessible equally through the “state interface” and the “callback interface” ● For native code, no substantial difference in performance between the two, just different ways of getting the same data.

7. Callback ● Can register a callback for a particular device interface or message type ○ “userdata” void pointer to be able to associate a callback with an object. ○ During a ClientContext Update, gets called once for each new data point for that path. ○ Since tracker rate is > framerate, often processing multiple tracker callbacks per frame ● Unregister callback: Free interface object

8. State ● Fundamentally the same data as callback, but on demand ○ Internally, callback automatically registered that updates the state. ○ May be more convenient than native-managed transitions for data that will be ignored anyway. ● Caveat: No state data until first new data received with Update!

9. Timing ● Everything tied to the Client Context Update ○ Callbacks only fire during Update ○ State only changes during Update ● Threading: ○ Keep Update for a client context in a single thread ○ Don’t call update while accessing data other ways (no locking included by default)

10. For more information: ● OSVR developer portal ○ http://osvr.github.io ● Sensics – Founding contributor to OSVR, experts working in VR/AR for over a decade ○ http://www.sensics.com

Add a comment

Related pages

OSVR Developer Portal | Presentations

Slides and Notes from Presentations ... Principles of the OSVR ClientKit API for writing a new client application or engine integration. OSVR Plugin Design
Read more

An Introduction to OSVR - OSVR Developer Portal

An Introduction to OSVR. ... OSVR™ is an open-source software platform for VR/AR applications. OSVR ... promotes innovation through its open design and ...
Read more

An Introduction to OSVR - OSVR - Open-Source Virtual ...

An Introduction to OSVR Yuval Boger1 and Ryan Pavlik2, Dec 12th 2014 What is OSVR? OSVR™ is an open-source software platform for VR/AR applications.
Read more

Chapter 21: Designing Web Applications

Design your Web application to run ... Avoid server affinity when designing Web applications if possible ... Web client applications, see "Design and ...
Read more

Client Application | LinkedIn

View 32425 Client Application posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn.
Read more

Smart Client Architecture and Design Guide

Download: Smart Client Architecture and Design Guide; Webcast: Smart Client Offline Application Block [Content link no longer available, original URL:http ...
Read more

Distributed Multitiered Applications - The Java EE 6 Tutorial

Distributed Multitiered Applications. ... An application client runs on a client ... provide a way to separate applications programming from web page design.
Read more

Download Microsoft Application Virtualization ...

The Microsoft Application Virtualization ADM template allows you to administer App-V client settings via Preferences.
Read more