5.2. The Teleport Client library

5.2.1. Introduction

TeleportClient is a library that provides client functionality, in particular client-specific networking and object management.

5.2.2. Classes

struct ClientServerState

The generic state of the client hardware device e.g. headset, controllers etc. There exists one of these for each server, plus one for the null server (local state).

class ClientPipeline

Contains the full pipeline and member nodes for the client.

class Config

Public Functions

void StoreRecentURL(const char *r)

When we connect, store the URL.

void SetStorageFolder(const char *f)

Where do we store temp files?

class DiscoveryService

Abstract discovery service for clients to connect to the server.

Public Functions

uint64_t Discover(uint64_t server_uid, std::string serverIP, uint16_t serverDiscoveryPort)

Returns Client ID.

class OpenXR

Subclassed by teleport::UseOpenXR, teleport::android::OpenXR

Public Functions

void SetFallbackBinding(ActionId actionId, std::string path)

Set a “virtual” pose binding - e.g. mouse emulation.

void OnMouseButtonPressed(bool bLeftButtonDown, bool bRightButtonDown, bool bMiddleButtonDown, int nMouseWheelDelta)

Process mouse and keyboard.

void RemoveNodePoseMapping(avs::uid server_uid, avs::uid uid)

Remove the mapping of the specified node - it has perhaps been unmapped or destroyed.

const std::vector<InputMapping> &GetServerInputMappings(avs::uid server_uid)

Get the currently bound input mappings for the server.

const std::map<avs::uid, NodePoseMapping> &GetServerNodePoseMappings(avs::uid server_uid)

Get the currently bound pose mappings for the server.

const avs::Pose &GetHeadPose_StageSpace() const

Get the head pose in the device’s stage space (axes adapted to the Engineering standard, Z=up).

const std::vector<avs::Pose> &GetTrackedHandJointPoses(int i)

Get the poses relative to the hand root.

avs::Pose GetTrackedHandRootPose(int i) const

Get the hand root pose in local space.

Parameters:

i – index of the hand.

Returns:

class SessionClient : public avs::GenericTargetInterface

Public Functions

void ApplySetup(const teleport::core::SetupCommand &s)

For use only internally or by Renderer for the local session.

bool IsReadyToRender() const

Is this client ready to render, i.e. does it have the final setup from the server required to initialize rendering? return true if ready, false if not.

struct SignalingServer

Identifies a remote server as seen by the DiscoveryService.