Skip to content
This repository was archived by the owner on Nov 20, 2022. It is now read-only.

K2API: (5) Downloading trackers

公彦赤屋先 edited this page Jan 31, 2022 · 2 revisions

Downloading trackers via K2API

If you've added some custom trackers to K2Server, after you re-run your app, you may need to download them.
You may also just save their IDs, although this is a bit of trivial solution.
Now this is where you can download the whole tracker base from the server.

KTVR's been making use of this until we've switched to prepended trackers, here.
On worse PCs it may be needed to try downloading a tracker more than 1 time.

You may either download a tracker by its ID or serial number.

// Download via serial
auto tracker_downloaded = ktvr::download_tracker("LHR-000000");

// Download via ID
auto tracker_downloaded = ktvr::download_tracker(4);

// Download via Role
auto tracker_downloaded = ktvr::download_tracker(Tracker_Handed);

// Overloads will take care of the passed type

This function will return the tracker's TrackerBase if it was successful or an error code for failure.

In the downloaded TrackerBase, you'll find the ID, pose, data (w/ role) and state.

Clone this wiki locally