52 using std::chrono::system_clock;
53 const auto deadline = system_clock::now() + std::chrono::milliseconds(200);
59 auto q = osvr::util::eigen_interop::map(state);
61 Eigen::AngleAxisd correction(-yaw, Eigen::Vector3d::UnitY());
62 xform.concatPost(Eigen::Isometry3d(correction).matrix());
67 }
while (system_clock::now() < deadline);
OSVR_ReturnCode osvrClientClearRoomToWorldTransform(OSVR_ClientContext ctx)
Clears/resets the internal "room to world" transformation back to an identity transformation - that i...
osvr::common::Transform const & getRoomToWorldTransform() const
Gets the transform from room space to world space.
auto extractYaw(T const &quat) -> decltype(std::atan(quat.w()))
A structure defining a quaternion, often a unit quaternion representing 3D rotation.
Class that should be used for all internally-used client interface objects as it handles ownership wi...
#define OSVR_RETURN_FAILURE
The "failure" value for an OSVR_ReturnCode.
void setRoomToWorldTransform(osvr::common::Transform const &xform)
Sets the transform from room space to world space.
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
OSVR_ReturnCode osvrClientSetRoomRotationUsingHead(OSVR_ClientContext ctx)
Updates the internal "room to world" transformation (applied to all tracker data for this client cont...
Header for interoperation between the Eigen math library, the internal mini math library, and VRPN's quatlib.
OSVR_ReturnCode osvrGetOrientationState(OSVR_ClientInterface iface, struct OSVR_TimeValue *timestamp, OSVR_OrientationState *state)
Get Orientation state from an interface, returning failure if none \ * exists.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
void update()
System-wide update method.