51 for (i = 0; i < 1000000; ++i) {
61 printf(
"No pose state!\n");
63 printf(
"Got POSE state: Position = (%f, %f, %f), orientation = "
77 printf(
"Library shut down, exiting.\n");
OSVR_ReturnCode osvrClientGetInterface(OSVR_ClientContext ctx, const char path[], OSVR_ClientInterface *iface)
Get the interface associated with the given path.
double osvrQuatGetY(OSVR_Quaternion const *q)
Accessor for quaternion component Y.
OSVR_ClientContext osvrClientInit(const char applicationIdentifier[], uint32_t flags=0)
Initialize the library.
OSVR_Quaternion rotation
Orientation as a unit quaternion.
double data[3]
Internal array data.
double osvrQuatGetX(OSVR_Quaternion const *q)
Accessor for quaternion component X.
OSVR_ReturnCode osvrClientShutdown(OSVR_ClientContext ctx)
Shutdown the library.
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
struct OSVR_ClientContextObject * OSVR_ClientContext
Opaque handle that should be retained by your application. You need only and exactly one...
OSVR_ReturnCode osvrClientUpdate(OSVR_ClientContext ctx)
Updates the state of the context - call regularly in your mainloop.
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
double osvrQuatGetW(OSVR_Quaternion const *q)
Accessor for quaternion component W.
struct OSVR_ClientInterfaceObject * OSVR_ClientInterface
Opaque handle to an interface used for registering callbacks and getting status.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
double osvrQuatGetZ(OSVR_Quaternion const *q)
Accessor for quaternion component Z.
OSVR_Vec3 translation
Position vector.
OSVR_ReturnCode osvrGetPoseState(OSVR_ClientInterface iface, struct OSVR_TimeValue *timestamp, OSVR_PoseState *state)
Get Pose state from an interface, returning failure if none \ * exists.