OSVR-Core
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
osvr::common::SkeletonComponent Class Reference

BaseDevice component. More...

#include <SkeletonComponent.h>

Inheritance diagram for osvr::common::SkeletonComponent:
osvr::common::DeviceComponent

Public Types

typedef std::function< void(SkeletonNotification const &, util::time::TimeValue const &)> SkeletonHandler
 
typedef std::function< void(SkeletonSpec const &, util::time::TimeValue const &)> SkeletonSpecHandler
 
- Public Types inherited from osvr::common::DeviceComponent
typedef BaseDevice Parent
 

Public Member Functions

OSVR_COMMON_EXPORT void sendNotification (OSVR_ChannelCount sensor, OSVR_TimeValue const &timestamp)
 Sends a notification to the client that tracker reports for given skeleton had finished reporting and it can coalesce reports now.
 
OSVR_COMMON_EXPORT void sendArticulationSpec (std::string const &spec)
 Sends a new or updated articulation specification to the client. More...
 
OSVR_COMMON_EXPORT OSVR_ReturnCode setArticulationSpec (std::string const &jsonDescriptor)
 Sets the articultion specification. More...
 
OSVR_COMMON_EXPORT void registerSkeletonHandler (SkeletonHandler cb)
 
OSVR_COMMON_EXPORT void registerSkeletonSpecHandler (SkeletonSpecHandler cb)
 
- Public Member Functions inherited from osvr::common::DeviceComponent
void recordParent (Parent &dev)
 Called (only) by BaseDevice when being added: effectively records a "parent pointer" that does not convey ownership. More...
 
void update ()
 Called during mainloop.
 

Static Public Member Functions

static OSVR_COMMON_EXPORT shared_ptr< SkeletonComponentcreate (std::string const &jsonSpec)
 Factory method. More...
 

Public Attributes

messages::SkeletonRecord skeletonRecord
 Message from server to client, containing skeleton notification. More...
 
messages::SkeletonSpecRecord skeletonSpecRecord
 Message from server to client, containing new/updated skeleton articulation spec.
 

Additional Inherited Members

- Protected Member Functions inherited from osvr::common::DeviceComponent
 DeviceComponent ()
 Protected constructor, to require subclassing.
 
bool m_hasParent () const
 Returns true if we have a parent registered.
 
Parentm_getParent ()
 Gets the parent - only call if m_hasParent() is true.
 
void m_registerHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType)
 Registers a handler whose lifetime is tied to the lifetime of the component. More...
 
virtual void m_update ()
 Implementation-specific (optional) stuff to do during mainloop.
 

Detailed Description

BaseDevice component.

Member Function Documentation

§ create()

shared_ptr< SkeletonComponent > osvr::common::SkeletonComponent::create ( std::string const &  jsonSpec)
static

Factory method.

Required to ensure that allocation and deallocation stay on the same side of a DLL line.

§ sendArticulationSpec()

void osvr::common::SkeletonComponent::sendArticulationSpec ( std::string const &  spec)

Sends a new or updated articulation specification to the client.

Used by plugins and internally when client first connects

Todo:
do we need to verify that it read the spec correctly?

§ setArticulationSpec()

OSVR_ReturnCode osvr::common::SkeletonComponent::setArticulationSpec ( std::string const &  jsonDescriptor)

Sets the articultion specification.

Should be used during the creation of skeleton component.

Todo:
add validation to make sure that articulation spec is provided

Member Data Documentation

§ skeletonRecord

messages::SkeletonRecord osvr::common::SkeletonComponent::skeletonRecord

Message from server to client, containing skeleton notification.


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