OSVR-Core
|
BaseDevice component. More...
#include <Location2DComponent.h>
Public Types | |
typedef std::function< void(LocationData const &, util::time::TimeValue const &)> | LocationHandler |
![]() | |
typedef BaseDevice | Parent |
Public Member Functions | |
OSVR_COMMON_EXPORT void | sendLocationData (OSVR_Location2DState location, OSVR_ChannelCount sensor, OSVR_TimeValue const ×tamp) |
OSVR_COMMON_EXPORT void | registerLocationHandler (LocationHandler cb) |
![]() | |
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< Location2DComponent > | create (OSVR_ChannelCount numSensor=1) |
Factory method. More... | |
Public Attributes | |
messages::LocationRecord | locationRecord |
Message from server to client, containing 2D location data. | |
Additional Inherited Members | |
![]() | |
DeviceComponent () | |
Protected constructor, to require subclassing. | |
bool | m_hasParent () const |
Returns true if we have a parent registered. | |
Parent & | m_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. | |
BaseDevice component.
|
static |
Factory method.
Required to ensure that allocation and deallocation stay on the same side of a DLL line.