25 #ifndef INCLUDED_ViewerEye_h_GUID_B895D9B8_5FF1_4991_D174_4AF145F83172 26 #define INCLUDED_ViewerEye_h_GUID_B895D9B8_5FF1_4991_D174_4AF145F83172 31 #include <osvr/Client/Export.h> 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
112 getProjection(
double near,
double far,
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;
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.
Definition: Angles.h:63
Definition: ViewerEye.h:51
uint32_t OSVR_SurfaceCount
The integer type specifying the number of surfaces seen by a viewer's eye.
Definition: RenderingTypesC.h:108
Definition: ViewerEye.h:57
Header declaring opaque types used by Client and ClientKit.
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
int32_t OSVR_DistortionPriority
The integer type used to indicate relative priorities of a display distortion strategy.
Definition: RenderingTypesC.h:121
Header wrapping include of <Eigen/Core> and <Eigen/Geometry> for warning quieting.
Definition: ViewerEyeSurface.h:40
Class that should be used for all internally-used client interface objects as it handles ownership wi...
Definition: InternalInterfaceOwner.h:45
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
Definition: DisplayConfig.h:50
#define OSVR_DISTORTION_PRIORITY_UNAVAILABLE
The constant to return as an OSVR_DistortionPriority if a given strategy is not available for a surfa...
Definition: RenderingTypesC.h:128
uint16_t OSVR_MatrixConventions
Type for passing matrix convention flags.
Definition: MatrixConventionsC.h:54
Header with integer types for Viewer, Eye, and Surface counts/indices, as well as viewport informatio...
Definition: ClientContext.h:50
Definition: ViewerEye.h:61
uint8_t OSVR_DisplayInputCount
A count or index for a display input in a display config.
Definition: RenderingTypesC.h:51
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
Definition: Pose3C.h:54