OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
DisplayC.h
Go to the documentation of this file.
1 
13 /*
14 // Copyright 2015 Sensics, Inc.
15 //
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
19 //
20 // http://www.apache.org/licenses/LICENSE-2.0
21 //
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
27 */
28 
29 #ifndef INCLUDED_DisplayC_h_GUID_8658EDC9_32A2_49A2_5F5C_10F67852AE74
30 #define INCLUDED_DisplayC_h_GUID_8658EDC9_32A2_49A2_5F5C_10F67852AE74
31 
32 /* Internal Includes */
33 #include <osvr/ClientKit/Export.h>
34 #include <osvr/Util/APIBaseC.h>
35 #include <osvr/Util/ReturnCodesC.h>
39 #include <osvr/Util/Pose3C.h>
40 #include <osvr/Util/BoolC.h>
42 
43 /* Library/third-party includes */
44 /* none */
45 
46 /* Standard includes */
47 /* none */
48 
49 OSVR_EXTERN_C_BEGIN
57 typedef struct OSVR_DisplayConfigObject *OSVR_DisplayConfig;
58 
101 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
103 
113 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
115 
126 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
128 
143 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetNumDisplayInputs(
144  OSVR_DisplayConfig disp, OSVR_DisplayInputCount *numDisplayInputs);
145 
162 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetDisplayDimensions(
163  OSVR_DisplayConfig disp, OSVR_DisplayInputCount displayInputIndex,
165 
179 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
181 
194 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetViewerPose(
195  OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_Pose3 *pose);
196 
211 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetNumEyesForViewer(
213 
227 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
229  OSVR_EyeCount eye, OSVR_Pose3 *pose);
230 
246 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixd(
248  OSVR_MatrixConventions flags, double *mat);
249 
265 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixf(
267  OSVR_MatrixConventions flags, float *mat);
268 
284 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetNumSurfacesForViewerEye(
286  OSVR_SurfaceCount *surfaces);
287 
311 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
316  OSVR_ViewportDimension *height);
317 
342 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
345  OSVR_SurfaceCount surface, OSVR_DisplayInputCount *displayInput);
346 
365 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
368  OSVR_SurfaceCount surface, double near, double far,
369  OSVR_MatrixConventions flags, double *matrix);
370 
389 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
392  OSVR_SurfaceCount surface, float near, float far,
393  OSVR_MatrixConventions flags, float *matrix);
394 
421 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
424  OSVR_SurfaceCount surface, double *left, double *right, double *bottom,
425  double *top);
426 
446 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
448  OSVR_ViewerCount viewer,
449  OSVR_EyeCount eye,
450  OSVR_SurfaceCount surface,
451  OSVR_CBool *distortionRequested);
452 
474 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
477  OSVR_SurfaceCount surface, OSVR_DistortionPriority *priority);
478 
495 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
499 
504 OSVR_EXTERN_C_END
505 
506 #endif
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.
Header declaring a type and values for simple C return codes.
uint32_t OSVR_SurfaceCount
The integer type specifying the number of surfaces seen by a viewer's eye.
Header providing a C-safe "bool" type, because we can't depend on Visual Studio providing proper C99 ...
OSVR_ReturnCode osvrClientCheckDisplayStartup(OSVR_DisplayConfig disp)
Checks to see if a display is fully configured and ready, including having received its first pose up...
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.
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.
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...
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...
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 ...
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...
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...
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...
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...
OSVR_ReturnCode osvrClientGetViewerPose(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_Pose3 *pose)
Get the pose of a viewer in a display config.
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...
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.
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: ...
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)
uint32_t OSVR_ViewerCount
The integer type specifying a number of viewers in a system.
struct OSVR_ClientContextObject * OSVR_ClientContext
Opaque handle that should be retained by your application. You need only and exactly one...
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...
Header providing basic C macros for defining API headers.
OSVR_ReturnCode osvrClientGetDisplay(OSVR_ClientContext ctx, OSVR_DisplayConfig *disp)
Allocates a display configuration object populated with data from the OSVR system.
OSVR_ReturnCode osvrClientFreeDisplay(OSVR_DisplayConfig disp)
Frees a display configuration object. The corresponding context must still be open.
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)
OSVR_ReturnCode osvrClientGetNumViewers(OSVR_DisplayConfig disp, OSVR_ViewerCount *viewers)
A display config can have one (or theoretically more) viewers: retrieve the viewer count...
uint8_t OSVR_EyeCount
The integer type specifying the number of eyes (viewpoints) of a viewer.
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
int32_t OSVR_ViewportDimension
The integer type used in specification of size or location of a viewport.
Header.
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...
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...
struct OSVR_DisplayConfigObject * OSVR_DisplayConfig
Opaque type of a display configuration.
Definition: DisplayC.h:57
int32_t OSVR_DisplayDimension
The integer type used in specification of size or location of a display input, in pixels...