コード例 #1
0
ファイル: NRRgbCamera.cs プロジェクト: nrealprojects/ARCinima
        private static void Capture(UInt64 rgb_camera_handle, UInt64 rgb_camera_image_handle)
        {
            FrameCount++;
            int RawDataSize = 0;

            if (TexturePtr == IntPtr.Zero)
            {
                m_NativeCamera.GetRawData(rgb_camera_image_handle, ref TexturePtr, ref RawDataSize);
                Resolution = m_NativeCamera.GetResolution(rgb_camera_image_handle);
                m_NativeCamera.DestroyImage(rgb_camera_image_handle);

                NRDebugger.Log(string.Format("[NRRgbCamera] on first fram ready textureptr:{0} rawdatasize:{1} Resolution:{2}",
                                             TexturePtr, RawDataSize, Resolution.ToString()));
                return;
            }

            m_NativeCamera.GetRawData(rgb_camera_image_handle, ref TexturePtr, ref RawDataSize);
            var timestamp = m_NativeCamera.GetHMDTimeNanos(rgb_camera_image_handle);

            QueueFrame(TexturePtr, RawDataSize, timestamp);

            if (OnImageUpdate != null)
            {
                OnImageUpdate();
            }
            m_NativeCamera.DestroyImage(rgb_camera_image_handle);
        }
コード例 #2
0
        public NativeResolution GetResolution(UInt64 imageHandle)
        {
            NativeResolution resolution = new NativeResolution(0, 0);
            var result = NativeApi.NRRGBCameraImageGetResolution(m_NativeCameraHandle, imageHandle, ref resolution);

            NRDebugger.Log("[NativeCamera] GetResolution: " + result.ToString());
            return(resolution);
        }
コード例 #3
0
ファイル: NativeHMD.cs プロジェクト: nrealprojects/ARCinima
        public NativeResolution GetEyeResolution(NativeEye eye = NativeEye.LEFT)
        {
            NativeResolution resolution = new NativeResolution(3840, 1080);

            NativeApi.NRHMDGetEyeResolution(m_HmdHandle, (int)NativeEye.LEFT, ref resolution);
            NRDebugger.Log("[NativeHMD GetEyeResolution]:" + resolution.ToString());
            return(resolution);
        }
コード例 #4
0
ファイル: NativeHMD.cs プロジェクト: chris0610/magic-dots
        public NativeResolution GetEyeResolution(NativeEye eye)
        {
            NativeResolution resolution = new NativeResolution(3840, 1080);

            NativeApi.NRHMDGetEyeResolution(m_HmdHandle, (int)eye, ref resolution);
            NRDebugger.LogFormat("[NativeHMD GetEyeResolution] eye:{0} resolution{1}:", eye, resolution.ToString());
            return(resolution);
        }
コード例 #5
0
        public NativeResolution GetResolution(UInt64 imageHandle)
        {
            NativeResolution resolution = new NativeResolution(0, 0);
            var result = NativeApi.NRRGBCameraImageGetResolution(m_NativeCameraHandle, imageHandle, ref resolution);

            NativeErrorListener.Check(result, this, "GetResolution");
            return(resolution);
        }
コード例 #6
0
ファイル: NativeHMD.cs プロジェクト: eric1932/LiveEarthHD
        public NativeResolution GetEyeResolution(NativeEye eye)
        {
            NativeResolution resolution = new NativeResolution(3840, 1080);
            var result = NativeApi.NRHMDGetEyeResolution(m_HmdHandle, (int)eye, ref resolution);

            NativeErrorListener.Check(result, this, "GetEyeResolution");
            return(resolution);
        }
コード例 #7
0
        private static void Capture(UInt64 rgb_camera_handle, UInt64 rgb_camera_image_handle)
        {
            FrameCount++;
            if (TexturePtr == IntPtr.Zero)
            {
                m_NativeCamera.GetRawData(rgb_camera_image_handle, ref TexturePtr, ref RawDataSize);
                Resolution = m_NativeCamera.GetResolution(rgb_camera_image_handle);
                m_NativeCamera.DestroyImage(rgb_camera_image_handle);
                TexuteData = new byte[RawDataSize];

                Debug.Log(string.Format("[NRRgbCamera] on first fram ready textureptr:{0} rawdatasize:{1} Resolution:{2}",
                                        TexturePtr, RawDataSize, Resolution.ToString()));
                return;
            }

            m_NativeCamera.GetRawData(rgb_camera_image_handle, ref TexturePtr, ref RawDataSize);
            Marshal.Copy(TexturePtr, TexuteData, 0, RawDataSize);
            if (OnImageUpdate != null)
            {
                OnImageUpdate();
            }
            m_NativeCamera.DestroyImage(rgb_camera_image_handle);
        }
コード例 #8
0
 public static extern NativeResult NRRGBCameraImageGetResolution(UInt64 rgb_camera_handle,
                                                                 UInt64 rgb_camera_image_handle, ref NativeResolution out_image_resolution);
コード例 #9
0
ファイル: NativeHMD.cs プロジェクト: nrealprojects/ARCinima
 public static extern NativeResult NRHMDGetEyeResolution(UInt64 hmd_handle, int eye, ref NativeResolution out_eye_resolution);