Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Public Member Functions | Static Public Member Functions | List of all members
SR::HandTracker Class Referenceabstract

Sense class which provides hand tracking functionality to the SR system. More...

#include <handtracker.h>

Inheritance diagram for SR::HandTracker:
[legend]
Collaboration diagram for SR::HandTracker:
[legend]

Public Member Functions

virtual std::shared_ptr< HandPoseStreamopenHandPoseStream (HandPoseListener *listener)=0
 Creates a HandPoseStream for listener to be connected to. More...
 
virtual std::shared_ptr< HandPoseStreamopenHandPoseStream (HandPoseListener *listener, uint64_t handIdentifier)=0
 Creates a HandPoseStream specific for handIdentifier for listener to be connected to. More...
 
virtual std::shared_ptr< HandEventStreamopenHandEventStream (HandEventListener *listener)=0
 Creates a HandEventStream for listener to be connected to. More...
 
virtual void streamClosed (HandPoseStream *stream)=0
 Closes a specific HandPoseStream. More...
 
virtual void streamClosed (HandEventStream *stream)=0
 Closes a specific HandEventStream. More...
 
- Public Member Functions inherited from SR::Sense
void setCalibration (Transformation calibration)
 Sets a Transformation object to represent the sense's calibration with respect to the display. More...
 
Transformation getCalibration ()
 Gets callibration. More...
 
virtual ~Sense ()
 Ensures the proper destruction of the sense implementation. More...
 
virtual std::string getName ()=0
 Return the name of the sense. More...
 
virtual std::string getDescription ()=0
 Return a description of the sense. More...
 
virtual void start ()=0
 Start continuous updates, default behaviour is defined in the updater() function. More...
 
virtual void stop ()=0
 Stop continuous updates. More...
 

Static Public Member Functions

static HandTrackercreate (SRContext &context)
 Creates a functional HandTracker instance. More...
 
static std::shared_ptr< HandPoseStreamopenDynamicHandPoseStream (SR_handEvent createEvent, HandPoseListener *listener)
 Creates a HandPoseStream specific for createEvent for listener to be connected to. More...
 
static void closeDynamicHandPoseStream (SR_handEvent destroyEvent, HandPoseListener *listener)
 Closes a specific HandPoseStream referenced by destroyEvent. More...
 

Additional Inherited Members

- Protected Attributes inherited from SR::Sense
Transformation calibration
 

Detailed Description

Sense class which provides hand tracking functionality to the SR system.

Member Function Documentation

◆ closeDynamicHandPoseStream()

static void SR::HandTracker::closeDynamicHandPoseStream ( SR_handEvent  destroyEvent,
HandPoseListener listener 
)
inlinestatic

Closes a specific HandPoseStream referenced by destroyEvent.

Parameters
destroyEventreceived by an instance of HandEventListener signaling that no more data about a specific hand will be available
listenerinstance of HandPoseListener that was receiving data after a call to openDynamicHandPoseStream
Deprecated:
Creating a new stream in event handling function can cause deadlock

◆ create()

static HandTracker * SR::HandTracker::create ( SRContext context)
static

Creates a functional HandTracker instance.

The HandTracker class is abstract and requires a device specific implementation to be used in applications. This function constructs a HandTracker suitable for use in your application on the current device.

◆ openDynamicHandPoseStream()

static std::shared_ptr< HandPoseStream > SR::HandTracker::openDynamicHandPoseStream ( SR_handEvent  createEvent,
HandPoseListener listener 
)
inlinestatic

Creates a HandPoseStream specific for createEvent for listener to be connected to.

Parameters
createEventreceived by an instance of HandEventListener used to open a new stream
listenerinstance of HandPoseListener that should be receiving the data from the new stream
Deprecated:
Creating a new stream in event handling function can cause deadlock

◆ openHandEventStream()

virtual std::shared_ptr< HandEventStream > SR::HandTracker::openHandEventStream ( HandEventListener listener)
pure virtual

Creates a HandEventStream for listener to be connected to.

Parameters
listenerwill receive hand events from now on

When a new handPoseStream is registered, existing hands will raise an CreateHand event.

◆ openHandPoseStream() [1/2]

virtual std::shared_ptr< HandPoseStream > SR::HandTracker::openHandPoseStream ( HandPoseListener listener)
pure virtual

Creates a HandPoseStream for listener to be connected to.

Parameters
listenerwill receive handpose updates from now on

◆ openHandPoseStream() [2/2]

virtual std::shared_ptr< HandPoseStream > SR::HandTracker::openHandPoseStream ( HandPoseListener listener,
uint64_t  handIdentifier 
)
pure virtual

Creates a HandPoseStream specific for handIdentifier for listener to be connected to.

Parameters
listenerwill receive handpose updates about hand handIdentifier from now on
handIdentifierrefers to the a specific instance of a hand that was detected by the system

◆ streamClosed() [1/2]

virtual void SR::HandTracker::streamClosed ( HandEventStream stream)
pure virtual

Closes a specific HandEventStream.

Parameters
streamwill no longer supply hand events

◆ streamClosed() [2/2]

virtual void SR::HandTracker::streamClosed ( HandPoseStream stream)
pure virtual

Closes a specific HandPoseStream.

Parameters
streamwill no longer supply handpose updates

The documentation for this class was generated from the following file: