OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
DisplayC.cpp
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 // Internal Includes
28 #include <osvr/Util/Verbosity.h>
31 #include <osvr/Util/MacroToolsC.h>
32 #include <osvr/Util/EigenExtras.h>
33 #include <osvr/Util/EigenInterop.h>
36 
37 // Library/third-party includes
38 #include <boost/assert.hpp>
39 
40 // Standard includes
41 #include <utility>
42 
45  : ctx(context),
47  OSVR_DEV_VERBOSE("Created an OSVR_DisplayConfigObject!");
48  }
50  OSVR_DEV_VERBOSE("OSVR_DisplayConfigObject destructor");
51  }
53  osvr::client::DisplayConfigPtr cfg;
54 };
55 
56 #define OSVR_VALIDATE_OUTPUT_PTR(X, DESC) \
57  OSVR_UTIL_MULTILINE_BEGIN \
58  if (nullptr == X) { \
59  OSVR_DEV_VERBOSE("Passed a null pointer for output parameter " #X \
60  ", " DESC "!"); \
61  return OSVR_RETURN_FAILURE; \
62  } \
63  OSVR_UTIL_MULTILINE_END
64 
66  OSVR_DisplayConfig *disp) {
67  OSVR_VALIDATE_OUTPUT_PTR(disp, "display config");
68  if (ctx == nullptr) {
69  OSVR_DEV_VERBOSE("Passed a null client context!");
70  *disp = nullptr;
71  return OSVR_RETURN_FAILURE;
72  }
73  std::shared_ptr<OSVR_DisplayConfigObject> config;
74  try {
75  config = std::make_shared<OSVR_DisplayConfigObject>(ctx);
76  } catch (std::exception &e) {
77  OSVR_DEV_VERBOSE(
78  "Error creating display config: constructor threw exception :"
79  << e.what());
80  return OSVR_RETURN_FAILURE;
81  }
82  if (!config) {
83  OSVR_DEV_VERBOSE(
84  "Error creating display config - null config returned");
85  return OSVR_RETURN_FAILURE;
86  }
87  if (!config->cfg) {
88  OSVR_DEV_VERBOSE("Error creating display config - null internal config "
89  "object returned");
90  return OSVR_RETURN_FAILURE;
91  }
92  ctx->acquireObject(config);
93  *disp = config.get();
94  return OSVR_RETURN_SUCCESS;
95 }
96 
97 #define OSVR_VALIDATE_DISPLAY_CONFIG \
98  OSVR_UTIL_MULTILINE_BEGIN \
99  if (nullptr == disp) { \
100  OSVR_DEV_VERBOSE("Passed a null display config!"); \
101  return OSVR_RETURN_FAILURE; \
102  } \
103  OSVR_UTIL_MULTILINE_END
104 
106 
109 #define OSVR_VALIDATE_VIEWER_ID \
110  BOOST_ASSERT_MSG(viewer == 0, "Must pass a valid viewer ID.")
111 
112 #define OSVR_VALIDATE_EYE_ID \
113  BOOST_ASSERT_MSG(eye < disp->cfg->getNumViewerEyes(viewer), \
114  "Must pass a valid eye ID.")
115 
117 #define OSVR_VALIDATE_SURFACE_ID \
118  BOOST_ASSERT_MSG(surface == 0, "Must pass a valid surface ID.")
119 
120 #define OSVR_VALIDATE_DISPLAY_INPUT_ID \
121  BOOST_ASSERT_MSG(displayInputIndex < disp->cfg->getNumDisplayInputs(), \
122  "Must pass a valid display input index.")
123 
125  OSVR_VALIDATE_DISPLAY_CONFIG;
126  OSVR_ClientContext ctx = disp->ctx;
127  BOOST_ASSERT_MSG(
128  ctx != nullptr,
129  "Should never get a display config object with a null context in it.");
130  if (nullptr == ctx) {
131  return OSVR_RETURN_FAILURE;
132  }
133  auto freed = ctx->releaseObject(disp);
134  return freed ? OSVR_RETURN_SUCCESS : OSVR_RETURN_FAILURE;
135 }
136 
138  OSVR_VALIDATE_DISPLAY_CONFIG;
139  return disp->cfg->isStartupComplete() ? OSVR_RETURN_SUCCESS
141 }
142 
143 OSVR_ReturnCode
145  OSVR_DisplayInputCount *numDisplayInputs) {
146 
147  OSVR_VALIDATE_DISPLAY_CONFIG;
148  OSVR_VALIDATE_OUTPUT_PTR(numDisplayInputs, "display inputs count");
149  *numDisplayInputs = disp->cfg->getNumDisplayInputs();
150  return OSVR_RETURN_SUCCESS;
151 }
152 
154  OSVR_DisplayConfig disp, OSVR_DisplayInputCount displayInputIndex,
156 
157  OSVR_VALIDATE_DISPLAY_CONFIG;
158  OSVR_VALIDATE_DISPLAY_INPUT_ID;
159  OSVR_VALIDATE_OUTPUT_PTR(width, "width");
160  OSVR_VALIDATE_OUTPUT_PTR(height, "height");
161  *width = disp->cfg->getDisplayInput(displayInputIndex).getDisplayWidth();
162  *height = disp->cfg->getDisplayInput(displayInputIndex).getDisplayHeight();
163  return OSVR_RETURN_SUCCESS;
164 }
165 
167  OSVR_ViewerCount *viewers) {
168  OSVR_VALIDATE_DISPLAY_CONFIG;
169  OSVR_VALIDATE_OUTPUT_PTR(viewers, "viewer count");
170  *viewers = disp->cfg->getNumViewers();
171  return OSVR_RETURN_SUCCESS;
172 }
173 
175  OSVR_ViewerCount viewer,
176  OSVR_Pose3 *pose) {
177  OSVR_VALIDATE_DISPLAY_CONFIG;
179  OSVR_VALIDATE_OUTPUT_PTR(pose, "viewer pose");
180  try {
181  *pose = disp->cfg->getViewer(viewer).getPose();
182  return OSVR_RETURN_SUCCESS;
183  } catch (osvr::client::NoPoseYet &) {
184  OSVR_DEV_VERBOSE("Error getting viewer pose: no pose yet available");
185  return OSVR_RETURN_FAILURE;
186  } catch (std::exception &e) {
187 
188  OSVR_DEV_VERBOSE("Error getting viewer pose - exception: " << e.what());
189  return OSVR_RETURN_FAILURE;
190  }
191  return OSVR_RETURN_FAILURE;
192 }
193 
195  OSVR_ViewerCount viewer,
196  OSVR_EyeCount *eyes) {
197  OSVR_VALIDATE_DISPLAY_CONFIG;
199  OSVR_VALIDATE_OUTPUT_PTR(eyes, "eye count");
200  *eyes = disp->cfg->getNumViewerEyes(viewer);
201  return OSVR_RETURN_SUCCESS;
202 }
203 
205  OSVR_ViewerCount viewer,
206  OSVR_EyeCount eye,
207  OSVR_Pose3 *pose) {
208  OSVR_VALIDATE_DISPLAY_CONFIG;
210  OSVR_VALIDATE_EYE_ID;
211  OSVR_VALIDATE_OUTPUT_PTR(pose, "eye pose");
212  try {
213  *pose = disp->cfg->getViewerEye(viewer, eye).getPose();
214  return OSVR_RETURN_SUCCESS;
215  } catch (osvr::client::NoPoseYet &) {
216  OSVR_DEV_VERBOSE(
217  "Error getting viewer eye pose: no pose yet available");
218  return OSVR_RETURN_FAILURE;
219  } catch (std::exception &e) {
220 
221  OSVR_DEV_VERBOSE(
222  "Error getting viewer eye pose - exception: " << e.what());
223  return OSVR_RETURN_FAILURE;
224  }
225  return OSVR_RETURN_FAILURE;
226 }
227 
228 template <typename Scalar>
229 static inline OSVR_ReturnCode getViewMatrixImpl(OSVR_DisplayConfig disp,
230  OSVR_ViewerCount viewer,
231  OSVR_EyeCount eye, Scalar *mat,
232  OSVR_MatrixConventions flags) {
233  OSVR_VALIDATE_DISPLAY_CONFIG;
235  OSVR_VALIDATE_EYE_ID;
236  OSVR_VALIDATE_OUTPUT_PTR(mat, "view matrix");
237  try {
239  disp->cfg->getViewerEye(viewer, eye).getView(), flags, mat);
240  return OSVR_RETURN_SUCCESS;
241  } catch (osvr::client::NoPoseYet &) {
242  OSVR_DEV_VERBOSE(
243  "Error getting viewer eye view matrix: no pose yet available");
244  return OSVR_RETURN_FAILURE;
245  } catch (std::exception &e) {
246 
247  OSVR_DEV_VERBOSE(
248  "Error getting viewer eye view matrix - exception: " << e.what());
249  return OSVR_RETURN_FAILURE;
250  } catch (...) {
251  OSVR_DEV_VERBOSE("Error getting viewer eye view matrix");
252  return OSVR_RETURN_FAILURE;
253  }
254 }
255 
258  OSVR_MatrixConventions flags, double *mat) {
259  return getViewMatrixImpl(disp, viewer, eye, mat, flags);
260 }
261 
264  OSVR_MatrixConventions flags, float *mat) {
265  return getViewMatrixImpl(disp, viewer, eye, mat, flags);
266 }
267 
268 OSVR_ReturnCode
270  OSVR_ViewerCount viewer, OSVR_EyeCount eye,
271  OSVR_SurfaceCount *surfaces) {
272  OSVR_VALIDATE_DISPLAY_CONFIG;
274  OSVR_VALIDATE_EYE_ID;
275  OSVR_VALIDATE_OUTPUT_PTR(surfaces, "surface count");
276  *surfaces = disp->cfg->getNumViewerEyeSurfaces(viewer, eye);
277  return OSVR_RETURN_SUCCESS;
278 }
279 
284  OSVR_ViewportDimension *height) {
285 
286  OSVR_VALIDATE_DISPLAY_CONFIG;
288  OSVR_VALIDATE_EYE_ID;
290  OSVR_VALIDATE_OUTPUT_PTR(left, "viewport left bound");
291  OSVR_VALIDATE_OUTPUT_PTR(bottom, "viewport bottom bound");
292  OSVR_VALIDATE_OUTPUT_PTR(width, "viewport width");
293  OSVR_VALIDATE_OUTPUT_PTR(height, "viewport height");
294  auto viewport = disp->cfg->getViewerEyeSurface(viewer, eye, surface)
295  .getDisplayRelativeViewport();
296  *left = viewport.left;
297  *bottom = viewport.bottom;
298  *width = viewport.width;
299  *height = viewport.height;
300  return OSVR_RETURN_SUCCESS;
301 }
302 
305  OSVR_SurfaceCount surface, OSVR_DisplayInputCount *displayInput) {
306 
307  OSVR_VALIDATE_DISPLAY_CONFIG;
309  OSVR_VALIDATE_EYE_ID;
311  OSVR_VALIDATE_OUTPUT_PTR(displayInput, "index of display input");
312 
313  *displayInput = disp->cfg->getViewerEyeSurface(viewer, eye, surface)
314  .getDisplayInputIdx();
315 
316  return OSVR_RETURN_SUCCESS;
317 }
318 
319 template <typename Scalar>
320 static inline OSVR_ReturnCode
321 getProjectionMatrixImpl(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer,
322  OSVR_EyeCount eye, OSVR_SurfaceCount surface,
323  Scalar near, Scalar far, OSVR_MatrixConventions flags,
324  Scalar *mat) {
325  OSVR_VALIDATE_DISPLAY_CONFIG;
327  OSVR_VALIDATE_EYE_ID;
329  OSVR_VALIDATE_OUTPUT_PTR(mat, "projection matrix");
330  if (near == 0 || far == 0) {
331  OSVR_DEV_VERBOSE("Can't specify a near or far distance as 0!");
332  return OSVR_RETURN_FAILURE;
333  }
334  if (near < 0 || far < 0) {
335  OSVR_DEV_VERBOSE("Can't specify a negative near or far distance!");
336  return OSVR_RETURN_FAILURE;
337  }
338  if (near == far) {
339  OSVR_DEV_VERBOSE("Can't specify equal near and far distances!");
340  return OSVR_RETURN_FAILURE;
341  }
343  disp->cfg->getViewerEyeSurface(viewer, eye, surface)
344  .getProjection(near, far, flags),
345  flags, mat);
346 
347  return OSVR_RETURN_SUCCESS;
348 }
349 
352  OSVR_SurfaceCount surface, double near, double far,
353  OSVR_MatrixConventions flags, double *matrix) {
354  return getProjectionMatrixImpl(disp, viewer, eye, surface, near, far, flags,
355  matrix);
356 }
357 
360  OSVR_SurfaceCount surface, float near, float far,
361  OSVR_MatrixConventions flags, float *matrix) {
362  return getProjectionMatrixImpl(disp, viewer, eye, surface, near, far, flags,
363  matrix);
364 }
365 
368  OSVR_SurfaceCount surface, double *left, double *right, double *bottom,
369  double *top) {
370  OSVR_VALIDATE_DISPLAY_CONFIG;
372  OSVR_VALIDATE_EYE_ID;
373  OSVR_VALIDATE_OUTPUT_PTR(left, "left");
374  OSVR_VALIDATE_OUTPUT_PTR(right, "right");
375  OSVR_VALIDATE_OUTPUT_PTR(bottom, "bottom");
376  OSVR_VALIDATE_OUTPUT_PTR(top, "top");
377  auto rect = disp->cfg->getViewerEyeSurface(viewer, eye, surface).getRect();
378  *left = rect[rect.LEFT];
379  *right = rect[rect.RIGHT];
380  *bottom = rect[rect.BOTTOM];
381  *top = rect[rect.TOP];
382  return OSVR_RETURN_SUCCESS;
383 }
384 
387  OSVR_SurfaceCount surface, OSVR_CBool *distortionRequested) {
388  OSVR_VALIDATE_DISPLAY_CONFIG;
390  OSVR_VALIDATE_EYE_ID;
392  OSVR_VALIDATE_OUTPUT_PTR(distortionRequested, "distortion request");
393  *distortionRequested =
394  disp->cfg->getViewerEyeSurface(viewer, eye, surface).wantDistortion()
395  ? OSVR_TRUE
396  : OSVR_FALSE;
397  return OSVR_RETURN_SUCCESS;
398 }
399 
402  OSVR_SurfaceCount surface, OSVR_DistortionPriority *priority) {
403  OSVR_VALIDATE_DISPLAY_CONFIG;
405  OSVR_VALIDATE_EYE_ID;
407  OSVR_VALIDATE_OUTPUT_PTR(priority, "distortion technique priority");
408  *priority = disp->cfg->getViewerEyeSurface(viewer, eye, surface)
409  .getRadialDistortionPriority();
410  return OSVR_RETURN_SUCCESS;
411 }
412 
416  OSVR_VALIDATE_DISPLAY_CONFIG;
418  OSVR_VALIDATE_EYE_ID;
420  OSVR_VALIDATE_OUTPUT_PTR(params, "radial distortion parameter structure");
421  auto optParams = disp->cfg->getViewerEyeSurface(viewer, eye, surface)
422  .getRadialDistortionParams();
423  if (optParams.is_initialized()) {
424  *params = *optParams;
425  return OSVR_RETURN_SUCCESS;
426  }
427  return OSVR_RETURN_FAILURE;
428 }
uint8_t OSVR_CBool
A pre-C99-safe bool type. Canonical values for true and false are provided. Interpretation of other v...
Definition: BoolC.h:50
Parameters for a per-color-component radial distortion shader.
#define OSVR_FALSE
Canonical "false" value for OSVR_CBool.
Definition: BoolC.h:54
uint32_t OSVR_SurfaceCount
The integer type specifying the number of surfaces seen by a viewer's eye.
#define OSVR_VALIDATE_SURFACE_ID
Definition: DisplayC.cpp:117
OSVR_ReturnCode osvrClientCheckDisplayStartup(OSVR_DisplayConfig disp)
Checks to see if a display is fully configured and ready, including having received its first pose up...
Definition: DisplayC.cpp:137
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.
OSVR_ReturnCode osvrClientGetViewerEyePose(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_Pose3 *pose)
Get the "viewpoint" for the given eye of a viewer in a display config.
Definition: DisplayC.cpp:204
OSVR_ReturnCode osvrClientGetNumDisplayInputs(OSVR_DisplayConfig disp, OSVR_DisplayInputCount *numDisplayInputs)
A display config can have one or more display inputs to pass pixels over (HDMI/DVI connections...
Definition: DisplayC.cpp:144
#define OSVR_TRUE
Canonical "true" value for OSVR_CBool.
Definition: BoolC.h:52
OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixd(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_MatrixConventions flags, double *mat)
Get the view matrix (inverse of pose) for the given eye of a viewer in a display config - matrix of d...
Definition: DisplayC.cpp:256
OSVR_ReturnCode osvrClientGetRelativeViewportForViewerEyeSurface(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, OSVR_ViewportDimension *left, OSVR_ViewportDimension *bottom, OSVR_ViewportDimension *width, OSVR_ViewportDimension *height)
Get the dimensions/location of the viewport within the display input for a surface seen by an eye of ...
Definition: DisplayC.cpp:280
uint16_t OSVR_MatrixConventions
Type for passing matrix convention flags.
OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionClippingPlanes(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, double *left, double *right, double *bottom, double *top)
Get the clipping planes (positions at unit distance) for a surface seen by an eye of a viewer in a di...
Definition: DisplayC.cpp:366
OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixf(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_MatrixConventions flags, float *mat)
Get the view matrix (inverse of pose) for the given eye of a viewer in a display config - matrix of f...
Definition: DisplayC.cpp:262
OSVR_ReturnCode osvrClientGetViewerEyeSurfaceRadialDistortionPriority(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, OSVR_DistortionPriority *priority)
Returns the priority/availability of radial distortion parameters for a surface seen by an eye of a v...
Definition: DisplayC.cpp:400
#define OSVR_RETURN_FAILURE
The "failure" value for an OSVR_ReturnCode.
Definition: ReturnCodesC.h:47
OSVR_ReturnCode osvrClientGetViewerPose(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_Pose3 *pose)
Get the pose of a viewer in a display config.
Definition: DisplayC.cpp:174
void * acquireObject(T obj)
Pass (smart-pointer) ownership of some object to the client context.
Definition: ClientContext.h:94
OSVR_ReturnCode osvrClientGetNumSurfacesForViewerEye(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount *surfaces)
Each eye of each viewer in a display config has one or more surfaces (aka "screens") on which content...
Definition: DisplayC.cpp:269
OSVR_ReturnCode osvrClientGetDisplayDimensions(OSVR_DisplayConfig disp, OSVR_DisplayInputCount displayInputIndex, OSVR_DisplayDimension *width, OSVR_DisplayDimension *height)
Retrieve the pixel dimensions of a given display input for a display config.
Definition: DisplayC.cpp:153
OSVR_ReturnCode osvrClientGetNumEyesForViewer(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount *eyes)
Each viewer in a display config can have one or more "eyes" which have a substantially similar pose: ...
Definition: DisplayC.cpp:194
OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionMatrixd(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, double near, double far, OSVR_MatrixConventions flags, double *matrix)
Get the projection matrix for a surface seen by an eye of a viewer in a display config. (double version)
Definition: DisplayC.cpp:350
#define OSVR_VALIDATE_OUTPUT_PTR(X, DESC)
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
Definition: ReturnCodesC.h:45
uint32_t OSVR_ViewerCount
The integer type specifying a number of viewers in a system.
bool releaseObject(void *obj)
Frees some object whose lifetime is controlled by the client context.
#define OSVR_VALIDATE_VIEWER_ID
Definition: DisplayC.cpp:109
OSVR_ReturnCode osvrClientGetViewerEyeSurfaceDisplayInputIndex(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, OSVR_DisplayInputCount *displayInput)
Get the index of the display input for a surface seen by an eye of a viewer in a display config...
Definition: DisplayC.cpp:303
OSVR_ReturnCode osvrClientGetDisplay(OSVR_ClientContext ctx, OSVR_DisplayConfig *disp)
Allocates a display configuration object populated with data from the OSVR system.
Definition: DisplayC.cpp:65
OSVR_ReturnCode osvrClientFreeDisplay(OSVR_DisplayConfig disp)
Frees a display configuration object. The corresponding context must still be open.
Definition: DisplayC.cpp:124
OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionMatrixf(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, float near, float far, OSVR_MatrixConventions flags, float *matrix)
Get the projection matrix for a surface seen by an eye of a viewer in a display config. (float version)
Definition: DisplayC.cpp:358
OSVR_ReturnCode osvrClientGetNumViewers(OSVR_DisplayConfig disp, OSVR_ViewerCount *viewers)
A display config can have one (or theoretically more) viewers: retrieve the viewer count...
Definition: DisplayC.cpp:166
static DisplayConfigPtr create(OSVR_ClientContext ctx)
Header.
uint8_t OSVR_EyeCount
The integer type specifying the number of eyes (viewpoints) of a viewer.
Internal, configured header file for verbosity macros.
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.
Definition: Pose3C.h:54
Header for interoperation between the Eigen math library, the internal mini math library, and VRPN's quatlib.
int32_t OSVR_ViewportDimension
The integer type used in specification of size or location of a viewport.
Header containing basic macro tools.
OSVR_ReturnCode osvrClientDoesViewerEyeSurfaceWantDistortion(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, OSVR_CBool *distortionRequested)
Determines if a surface seen by an eye of a viewer in a display config requests some distortion to be...
Definition: DisplayC.cpp:385
OSVR_ReturnCode osvrClientGetViewerEyeSurfaceRadialDistortion(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface, OSVR_RadialDistortionParameters *params)
Returns the radial distortion parameters, if known/requested, for a surface seen by an eye of a viewe...
Definition: DisplayC.cpp:413
void matrixEigenAssign(T const &src, OSVR_MatrixConventions flags, Scalar *dest)
Helper function template to assign/convert matrices as required.
double Scalar
Common scalar type.
int32_t OSVR_DisplayDimension
The integer type used in specification of size or location of a display input, in pixels...