25 #ifndef INCLUDED_ViewerEye_h_GUID_B895D9B8_5FF1_4991_D174_4AF145F83172
26 #define INCLUDED_ViewerEye_h_GUID_B895D9B8_5FF1_4991_D174_4AF145F83172
41 #include <boost/optional.hpp>
50 class DisplayConfigFactory;
59 : std::runtime_error(
"No pose data yet for the interface!") {}
66 : m_pose(std::move(other.m_pose)), m_offset(other.m_offset),
67 m_viewport(other.m_viewport),
68 m_unitBounds(std::move(other.m_unitBounds)),
69 m_rot180(other.m_rot180), m_pitchTilt(other.m_pitchTilt),
70 m_radDistortParams(std::move(other.m_radDistortParams)),
71 m_displayInputIdx(other.m_displayInputIdx),
72 m_opticalAxisOffsetY(other.m_opticalAxisOffsetY) {}
80 return m_surfaces[index];
84 return m_surfaces[index];
88 OSVR_CLIENT_EXPORT
bool hasPose()
const;
90 OSVR_CLIENT_EXPORT Eigen::Matrix4d getView()
const;
92 bool wantDistortion()
const {
93 return m_radDistortParams.is_initialized();
96 boost::optional<OSVR_RadialDistortionParameters>
97 getRadialDistortionParams()
const {
98 return m_radDistortParams;
102 return (m_radDistortParams.is_initialized())
109 OSVR_CLIENT_EXPORT Eigen::Matrix4d
getProjection(
double near,
111 OSVR_CLIENT_EXPORT Eigen::Matrix4d
118 Viewport getDisplayRelativeViewport()
const {
return m_viewport; }
121 return m_displayInputIdx;
129 bool rot180,
double pitchTilt,
130 boost::optional<OSVR_RadialDistortionParameters> radDistortParams,
132 util::Angle opticalAxisOffsetY = 0. * util::radians);
133 util::Rectd m_getRect(
double near,
double far)
const;
134 Eigen::Isometry3d getPoseIsometry()
const;
136 Eigen::Vector3d m_offset;
138 std::vector<ViewerEyeSurface> m_surfaces;
145 boost::optional<OSVR_RadialDistortionParameters> m_radDistortParams;
153 #endif // INCLUDED_ViewerEye_h_GUID_B895D9B8_5FF1_4991_D174_4AF145F83172
AngleRadiansd Angle
Default angle type.
uint32_t OSVR_SurfaceCount
The integer type specifying the number of surfaces seen by a viewer's eye.
Header declaring opaque types used by Client and ClientKit.
int32_t OSVR_DistortionPriority
The integer type used to indicate relative priorities of a display distortion strategy. Negative values are defined to mean that strategy is unavailable.
Header wrapping include of and for warning quieting.
Class that should be used for all internally-used client interface objects as it handles ownership wi...
util::Rectd getRect() const
Gets clipping planes for a given surface.
#define OSVR_DISTORTION_PRIORITY_UNAVAILABLE
The constant to return as an OSVR_DistortionPriority if a given strategy is not available for a surfa...
uint16_t OSVR_MatrixConventions
Type for passing matrix convention flags.
Header with integer types for Viewer, Eye, and Surface counts/indices, as well as viewport informatio...
Eigen::Matrix4d getProjection(double near, double far) const
Gets a matrix that takes in row vectors in a right-handed system and outputs signed Z...
uint8_t OSVR_DisplayInputCount
A count or index for a display input in a display config.
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
Automatically-generated export header - do not edit!