Пример #1
0
 /** For use in simple VR apps, this method returns the concatenation of the
 * tracking pose and the eye matrix to get a full view matrix for each eye.
 * This is ( GetHeadFromEyePose() ) * (GetTrackerFromHeadPose() ^ -1 )  */
 public bool GetViewMatrix(float fSecondsFromNow, ref HmdMatrix44_t pMatLeftView, ref HmdMatrix44_t pMatRightView, ref HmdTrackingResult peResult)
 {
     return SteamVR.GetViewMatrix(m_pNativeObject, fSecondsFromNow, ref pMatLeftView, ref pMatRightView, ref peResult);
 }
Пример #2
0
 public static extern bool GetViewMatrix(System.IntPtr pHmd, float fSecondsFromNow, ref HmdMatrix44_t pMatLeftView, ref HmdMatrix44_t pMatRightView, ref HmdTrackingResult peResult);
Пример #3
0
 // ------------------------------------
 // Tracking Methods
 // ------------------------------------
 /** The pose that the tracker thinks that the HMD will be in at the specified
 * number of seconds into the future. Pass 0 to get the current state.
 *
 * This is roughly analogous to the inverse of the view matrix in most applications, though
 * many games will need to do some additional rotation or translation on top of the rotation
 * and translation provided by the head pose.
 *
 * If this function returns true the pose has been populated with a pose that can be used by the application.
 * Check peResult for details about the pose, including messages that should be displayed to the user.
 */
 public bool GetTrackerFromHeadPose(float fPredictedSecondsFromNow, ref HmdMatrix34_t pmPose, ref HmdTrackingResult peResult)
 {
     return SteamVR.GetTrackerFromHeadPose(m_pNativeObject, fPredictedSecondsFromNow, ref pmPose, ref peResult);
 }
internal static extern bool SteamAPI_vr_IHmd_GetTrackerFromHeadPose(IntPtr instancePtr, float fPredictedSecondsFromNow, ref HmdMatrix34_t pmPose, ref HmdTrackingResult peResult);
Пример #5
0
 public static extern bool GetTrackerFromHeadPose(System.IntPtr pHmd, float fPredictedSecondsFromNow, ref HmdMatrix34_t pmPose, ref HmdTrackingResult peResult);
Пример #6
0
        // ------------------------------------
        // Tracking Methods
        // ------------------------------------

        /** The pose that the tracker thinks that the HMD will be in at the specified
         * number of seconds into the future. Pass 0 to get the current state.
         *
         * This is roughly analogous to the inverse of the view matrix in most applications, though
         * many games will need to do some additional rotation or translation on top of the rotation
         * and translation provided by the head pose.
         *
         * If this function returns true the pose has been populated with a pose that can be used by the application.
         * Check peResult for details about the pose, including messages that should be displayed to the user.
         */
        public bool GetTrackerFromHeadPose(float fPredictedSecondsFromNow, ref HmdMatrix34_t pmPose, ref HmdTrackingResult peResult)
        {
            return(SteamVR.GetTrackerFromHeadPose(m_pNativeObject, fPredictedSecondsFromNow, ref pmPose, ref peResult));
        }
internal static extern bool SteamAPI_vr_IHmd_GetViewMatrix(IntPtr instancePtr, float fSecondsFromNow, ref HmdMatrix44_t pMatLeftView, ref HmdMatrix44_t pMatRightView, ref HmdTrackingResult peResult);
Пример #8
0
 public static extern bool GetTrackerFromHeadPose(System.IntPtr pHmd, float fPredictedSecondsFromNow, ref HmdMatrix34_t pmPose, ref HmdTrackingResult peResult);
Пример #9
0
 /** For use in simple VR apps, this method returns the concatenation of the
  * tracking pose and the eye matrix to get a full view matrix for each eye.
  * This is ( GetHeadFromEyePose() ) * (GetTrackerFromHeadPose() ^ -1 )  */
 public bool GetViewMatrix(float fSecondsFromNow, ref HmdMatrix44_t pMatLeftView, ref HmdMatrix44_t pMatRightView, ref HmdTrackingResult peResult)
 {
     return(SteamVR.GetViewMatrix(m_pNativeObject, fSecondsFromNow, ref pMatLeftView, ref pMatRightView, ref peResult));
 }
Пример #10
0
 public static extern bool GetViewMatrix(System.IntPtr pHmd, float fSecondsFromNow, ref HmdMatrix44_t pMatLeftView, ref HmdMatrix44_t pMatRightView, ref HmdTrackingResult peResult);
Пример #11
0
        public bool GetWorldFromHeadPose(float PredictedSecondsFromNow, out HmdMatrix34 Pose, out HmdTrackingResult Result)
        {
            CheckIfUsable();

            using (NativeBuffer buffer = new NativeBuffer(Marshal.SizeOf(typeof(HmdMatrix34))))
            {
                int TempResult = 0;

                bool result = NativeMethods.VR_Hmd_GetWorldFromHeadPose(PredictedSecondsFromNow, buffer.UnmanagedMemory, ref TempResult);
                Pose = NativeHelpers.ConvertStruct<HmdMatrix34>(buffer.UnmanagedMemory, buffer.UnmanagedSize);
                Result = (HmdTrackingResult)TempResult;

                return result;
            }
        }
Пример #12
0
        public bool GetViewMatrix(float SecondsFromNow, out HmdMatrix44 MatLeftView, out HmdMatrix44 MatRightView, out HmdTrackingResult Result)
        {
            CheckIfUsable();

            using (NativeBuffer LeftViewBuffer = new NativeBuffer(Marshal.SizeOf(typeof(HmdMatrix44))))
            {
                using (NativeBuffer RightViewBuffer = new NativeBuffer(Marshal.SizeOf(typeof(HmdMatrix44))))
                {
                    int TempResult = 0;
                    bool result = NativeMethods.VR_Hmd_GetViewMatrix(SecondsFromNow, LeftViewBuffer.UnmanagedMemory, RightViewBuffer.UnmanagedMemory, ref TempResult);

                    MatLeftView = NativeHelpers.ConvertStruct<HmdMatrix44>(LeftViewBuffer.UnmanagedMemory, LeftViewBuffer.UnmanagedSize);
                    MatRightView = NativeHelpers.ConvertStruct<HmdMatrix44>(RightViewBuffer.UnmanagedMemory, RightViewBuffer.UnmanagedSize);
                    Result = (HmdTrackingResult)TempResult;

                    return result;
                }
            }
        }
Пример #13
0
        public bool GetWorldFromHeadPose(float PredictedSecondsFromNow, out HmdMatrix34 Pose, out HmdTrackingResult Result)
        {
            CheckIfUsable();

            using (NativeBuffer buffer = new NativeBuffer(Marshal.SizeOf(typeof(HmdMatrix34))))
            {
                int TempResult = 0;

                bool result = NativeMethods.VR_Hmd_GetWorldFromHeadPose(PredictedSecondsFromNow, buffer.UnmanagedMemory, ref TempResult);
                Pose   = NativeHelpers.ConvertStruct <HmdMatrix34>(buffer.UnmanagedMemory, buffer.UnmanagedSize);
                Result = (HmdTrackingResult)TempResult;

                return(result);
            }
        }
Пример #14
0
        public bool GetViewMatrix(float SecondsFromNow, out HmdMatrix44 MatLeftView, out HmdMatrix44 MatRightView, out HmdTrackingResult Result)
        {
            CheckIfUsable();

            using (NativeBuffer LeftViewBuffer = new NativeBuffer(Marshal.SizeOf(typeof(HmdMatrix44))))
            {
                using (NativeBuffer RightViewBuffer = new NativeBuffer(Marshal.SizeOf(typeof(HmdMatrix44))))
                {
                    int  TempResult = 0;
                    bool result     = NativeMethods.VR_Hmd_GetViewMatrix(SecondsFromNow, LeftViewBuffer.UnmanagedMemory, RightViewBuffer.UnmanagedMemory, ref TempResult);

                    MatLeftView  = NativeHelpers.ConvertStruct <HmdMatrix44>(LeftViewBuffer.UnmanagedMemory, LeftViewBuffer.UnmanagedSize);
                    MatRightView = NativeHelpers.ConvertStruct <HmdMatrix44>(RightViewBuffer.UnmanagedMemory, RightViewBuffer.UnmanagedSize);
                    Result       = (HmdTrackingResult)TempResult;

                    return(result);
                }
            }
        }