Exemple #1
0
        public static Matrix44f ToMatrixf(Pose3 pose, MatrixConventionsFlags flags)
#endif
        {
            Matrix44f ret;

            MatrixConventionsNative.osvrPose3ToMatrixf(ref pose, flags, out ret);
            return(ret);
        }
Exemple #2
0
        /// <summary>
        /// Get the view matrix (inverse of pose) for the given eye of a
        /// viewer in a display config - matrix of floats.
        /// Will only succeed if CheckDisplayStartup() returns true.
        /// </summary>
        /// <param name="viewer">Viewer ID</param>
        /// <param name="eye">Eye ID</param>
        /// <param name="flags">Bitwise OR of matrix convention flags (see OSVR_MatrixFlags)</param>
        /// <returns>
        /// the transformation matrix from room space to eye space (not relative to pose of the viewer)
        /// </returns>
        public Matrix44f GetViewerEyeViewMatrixf(ViewerCount viewer, EyeCount eye, MatrixConventionsFlags flags)
        {
            Matrix44f ret;

            CheckSuccess(
                DisplayConfigNative.osvrClientGetViewerEyeViewMatrixf(mHandle, viewer, eye, flags, out ret),
                "[OSVR] DisplayConfig.GetViewerEyeViewMatrixf(): native osvrClientGetViewerEyeViewMatrixf call failed.");
            return(ret);
        }
        public static Matrix44f ToMatrixf(Pose3 pose, MatrixConventionsFlags flags)
#endif
        {
            Matrix44f ret;
            MatrixConventionsNative.osvrPose3ToMatrixf(ref pose, flags, out ret);
            return ret;
        }
        /// <summary>
        /// Convert a Pose3 to a Matrix44f, using the given convention flags
        /// </summary>
#if !NET20
        public static Matrix44f ToMatrixf(this Pose3 pose, MatrixConventionsFlags flags)
 public static extern Byte osvrPose3ToMatrixf(ref Pose3 pose, MatrixConventionsFlags flags, out Matrix44f mat);
 /// <summary>
 /// Get the projection matrix for a surface seen by an eye of a viewer
 /// in a display config. (float version)
 /// </summary>
 /// <param name="viewer">Viewer ID</param>
 /// <param name="eye">Eye ID</param>
 /// <param name="surface">Surface ID</param>
 /// <param name="near">Distance from viewpoint to near clipping plane - must be positive..</param>
 /// <param name="far">Distance from viewpoint to far clipping plane - must be positive
 /// and not equal to near, typically greater than near.</param>
 /// <param name="flags">Bitwise OR of matrix convention flags (see OSVR_MatrixFlags)</param>
 public Matrix44f GetProjectionMatrixForViewerEyeSurfacef(ViewerCount viewer, EyeCount eye, SurfaceCount surface, float near, float far, MatrixConventionsFlags flags)
 {
     Matrix44f ret;
     CheckSuccess(
         DisplayConfigNative.osvrClientGetViewerEyeSurfaceProjectionMatrixf(mHandle, viewer, eye, surface, near, far, flags, out ret),
         "[OSVR] DisplayConfig.GetProjectionForViewerEyeSurface(): native osvrClientGetProjectionForViewerEyeSurface call failed.");
     return ret;
 }
 /// <summary>
 /// Get the view matrix (inverse of pose) for the given eye of a
 /// viewer in a display config - matrix of floats. 
 /// Will only succeed if CheckDisplayStartup() returns true.
 /// </summary>
 /// <param name="viewer">Viewer ID</param>
 /// <param name="eye">Eye ID</param>
 /// <param name="flags">Bitwise OR of matrix convention flags (see OSVR_MatrixFlags)</param>
 /// <returns>
 /// the transformation matrix from room space to eye space (not relative to pose of the viewer)
 /// </returns>
 public Matrix44f GetViewerEyeViewMatrixf(ViewerCount viewer, EyeCount eye, MatrixConventionsFlags flags)
 {
     Matrix44f ret;
     CheckSuccess(
         DisplayConfigNative.osvrClientGetViewerEyeViewMatrixf(mHandle, viewer, eye, flags, out ret),
         "[OSVR] DisplayConfig.GetViewerEyeViewMatrixf(): native osvrClientGetViewerEyeViewMatrixf call failed.");
     return ret;
 }
 public extern static Byte osvrClientGetViewerEyeSurfaceProjectionMatrixf(SafeDisplayConfigHandle display,
     ViewerCount viewer, EyeCount eye, SurfaceCount surface, float near, float far,
     MatrixConventionsFlags flags, out Matrix44f matrix);
Exemple #9
0
        /// <summary>
        /// Convert a Pose3 to a Matrix44f, using the given convention flags
        /// </summary>
#if !NET20
        public static Matrix44f ToMatrixf(this Pose3 pose, MatrixConventionsFlags flags)
Exemple #10
0
        /// <summary>
        /// Get the projection matrix for a surface seen by an eye of a viewer
        /// in a display config. (float version)
        /// </summary>
        /// <param name="viewer">Viewer ID</param>
        /// <param name="eye">Eye ID</param>
        /// <param name="surface">Surface ID</param>
        /// <param name="near">Distance from viewpoint to near clipping plane - must be positive..</param>
        /// <param name="far">Distance from viewpoint to far clipping plane - must be positive
        /// and not equal to near, typically greater than near.</param>
        /// <param name="flags">Bitwise OR of matrix convention flags (see OSVR_MatrixFlags)</param>
        public Matrix44f GetProjectionMatrixForViewerEyeSurfacef(ViewerCount viewer, EyeCount eye, SurfaceCount surface, float near, float far, MatrixConventionsFlags flags)
        {
            Matrix44f ret;

            CheckSuccess(
                DisplayConfigNative.osvrClientGetViewerEyeSurfaceProjectionMatrixf(mHandle, viewer, eye, surface, near, far, flags, out ret),
                "[OSVR] DisplayConfig.GetProjectionForViewerEyeSurface(): native osvrClientGetProjectionForViewerEyeSurface call failed.");
            return(ret);
        }
Exemple #11
0
 public extern static Byte osvrClientGetViewerEyeSurfaceProjectionMatrixf(SafeDisplayConfigHandle display,
                                                                          ViewerCount viewer, EyeCount eye, SurfaceCount surface, float near, float far,
                                                                          MatrixConventionsFlags flags, out Matrix44f matrix);
Exemple #12
0
 public extern static Byte osvrClientGetViewerEyeViewMatrixf(SafeDisplayConfigHandle display,
                                                             ViewerCount viewer, EyeCount eye, MatrixConventionsFlags flags, out Matrix44f mat);
Exemple #13
0
        public static void ToMatrixf(Pose3 pose, MatrixConventionsFlags flags, out Matrix44f matrix)
#endif
        {
            MatrixConventionsNative.osvrPose3ToMatrixf(ref pose, flags, out matrix);
        }
Exemple #14
0
        /// <summary>
        /// Convert a Pose3 to a Matrix44f, using the given convention flags
        /// </summary>
#if !NET20
        public static void ToMatrixf(this Pose3 pose, MatrixConventionsFlags flags, out Matrix44f matrix)
        /// <summary>
        /// Convert a Pose3 to a Matrix44f, using the given convention flags
        /// </summary>
#if !NET20
        public static void ToMatrixf(this Pose3 pose, MatrixConventionsFlags flags, out Matrix44f matrix)
 public extern static Byte osvrClientGetViewerEyeViewMatrixf(SafeDisplayConfigHandle display,
     ViewerCount viewer, EyeCount eye, MatrixConventionsFlags flags, out Matrix44f mat);
        public static void ToMatrixf(Pose3 pose, MatrixConventionsFlags flags, out Matrix44f matrix)
#endif
        {
            MatrixConventionsNative.osvrPose3ToMatrixf(ref pose, flags, out matrix);
        }
Exemple #18
0
 public static extern Byte osvrPose3ToMatrixf(ref Pose3 pose, MatrixConventionsFlags flags, out Matrix44f mat);