示例#1
0
        public bool Destroy(UInt64 config_handle)
        {
            var result = NativeApi.NRConfigDestroy(m_NativeInterface.TrackingHandle, config_handle);

            NativeErrorListener.Check(result, this, "Destroy");
            return(result == NativeResult.Success);
        }
示例#2
0
        public bool SetTrackableImageDataBase(UInt64 config_handle, UInt64 database_handle)
        {
            var result = NativeApi.NRConfigSetTrackableImageDatabase(m_NativeInterface.TrackingHandle, config_handle, database_handle);

            NativeErrorListener.Check(result, this, "SetTrackableImageDataBase");
            return(result == NativeResult.Success);
        }
示例#3
0
        public bool SetImageFormat(CameraImageFormat format)
        {
            var result = NativeApi.NRRGBCameraSetImageFormat(m_NativeCameraHandle, format);

            NativeErrorListener.Check(result, this, "SetImageFormat");
            return(result == NativeResult.Success);
        }
        public bool Destroy()
        {
            NativeResult result = NativeApi.NRDisplayDestroy(m_MultiDisplayHandle);

            NativeErrorListener.Check(result, this, "Destroy");
            return(result == NativeResult.Success);
        }
示例#5
0
        public bool Resume()
        {
            var result = NativeApi.NRRenderingResume(m_RenderingHandle);

            NativeErrorListener.Check(result, this, "Resume");
            return(result == NativeResult.Success);
        }
示例#6
0
        public bool Start()
        {
            var result = NativeApi.NRRenderingStart(m_RenderingHandle);

            NativeErrorListener.Check(result, this, "Start");
            return(result == NativeResult.Success);
        }
示例#7
0
        public bool DestroyImage(UInt64 imageHandle)
        {
            var result = NativeApi.NRRGBCameraImageDestroy(m_NativeCameraHandle, imageHandle);

            NativeErrorListener.Check(result, this, "DestroyImage");
            return(result == NativeResult.Success);
        }
示例#8
0
        public bool SetPlaneFindMode(UInt64 config_handle, TrackablePlaneFindingMode mode)
        {
            int mode_value;

            switch (mode)
            {
            case TrackablePlaneFindingMode.DISABLE:
            case TrackablePlaneFindingMode.HORIZONTAL:
            case TrackablePlaneFindingMode.VERTICLE:
                mode_value = (int)mode;
                break;

            case TrackablePlaneFindingMode.BOTH:
                mode_value = ((int)TrackablePlaneFindingMode.HORIZONTAL) | ((int)TrackablePlaneFindingMode.VERTICLE);
                break;

            default:
                mode_value = (int)TrackablePlaneFindingMode.DISABLE;
                break;
            }
            var result = NativeApi.NRConfigSetTrackablePlaneFindingMode(m_NativeInterface.TrackingHandle, config_handle, mode_value);

            NativeErrorListener.Check(result, this, "SetPlaneFindMode");
            return(result == NativeResult.Success);
        }
示例#9
0
        public bool Create()
        {
            var result = NativeApi.NRHeadTrackingCreate(m_NativeInterface.TrackingHandle, ref headTrackingHandle);

            NativeErrorListener.Check(result, this, "Create");
            return(result == NativeResult.Success);
        }
        public bool UpdateHomeScreenTexture(IntPtr rendertexture)
        {
            NativeResult result = NativeApi.NRDisplaySetMainDisplayTexture(m_MultiDisplayHandle, rendertexture);

            NativeErrorListener.Check(result, this, "UpdateHomeScreenTexture");
            return(result == NativeResult.Success);
        }
        public bool Create()
        {
            NativeResult result = NativeApi.NRDisplayCreate(ref m_MultiDisplayHandle);

            NativeErrorListener.Check(result, this, "Create");
            return(result == NativeResult.Success);
        }
示例#12
0
        public bool Destroy()
        {
            NativeResult result = NativeApi.NRTrackingDestroy(m_TrackingHandle);

            NativeErrorListener.Check(result, this, "Destroy");
            return(result == NativeResult.Success);
        }
示例#13
0
 public bool Create()
 {
     NativeResult result = NativeApi.NRTrackingCreate(ref m_TrackingHandle);
     NativeErrorListener.Check(result, this, "Create");
     m_NativeInterface.TrackingHandle = m_TrackingHandle;
     return result == NativeResult.Success;
 }
示例#14
0
        public bool Start()
        {
            NativeResult result = NativeApi.NRTrackingStart(m_TrackingHandle);

            NativeErrorListener.Check(result, this, "Start");
            return(result == NativeResult.Success);
        }
示例#15
0
        public bool Resume()
        {
            NativeResult result = NativeApi.NRTrackingResume(m_TrackingHandle);

            NativeErrorListener.Check(result, this, "Resume");
            return(result == NativeResult.Success);
        }
示例#16
0
        public bool Release()
        {
            var result = NativeApi.NRRGBCameraDestroy(m_NativeCameraHandle);

            NativeErrorListener.Check(result, this, "Release");
            return(result == NativeResult.Success);
        }
示例#17
0
        public bool SetTrackingMode(TrackingMode mode)
        {
            NativeResult result = NativeApi.NRTrackingInitSetTrackingMode(m_TrackingHandle, mode);

            NativeErrorListener.Check(result, this, "SetTrackingMode");
            return(result == NativeResult.Success);
        }
        public bool DestroyDataBase(UInt64 database_handle)
        {
            var result = NativeApi.NRTrackableImageDatabaseDestroy(m_NativeInterface.TrackingHandle, database_handle);

            NativeErrorListener.Check(result, this, "DestroyDataBase");
            return(result == NativeResult.Success);
        }
        public bool Resume()
        {
            NativeResult result = NativeApi.NRDisplayResume(m_MultiDisplayHandle);

            NativeErrorListener.Check(result, this, "Resume");
            return(result == NativeResult.Success);
        }
示例#20
0
        public bool SetCaptureCallback(NRRGBCameraImageCallback callback, UInt64 userdata = 0)
        {
            var result = NativeApi.NRRGBCameraSetCaptureCallback(m_NativeCameraHandle, callback, userdata);

            NativeErrorListener.Check(result, this, "SetCaptureCallback");
            return(result == NativeResult.Success);
        }
示例#21
0
        public bool StopCapture()
        {
            var result = NativeApi.NRRGBCameraStopCapture(m_NativeCameraHandle);

            NativeErrorListener.Check(result, this, "StopCapture");
            return(result == NativeResult.Success);
        }
示例#22
0
        public bool Create()
        {
            var result = NativeApi.NRRGBCameraCreate(ref m_NativeCameraHandle);

            NativeErrorListener.Check(result, this, "Create");
            return(result == NativeResult.Success);
        }
示例#23
0
        public bool Pause()
        {
            NativeResult result = NativeApi.NRHMDPause(m_HmdHandle);

            NativeErrorListener.Check(result, this, "Pause");
            return(result == NativeResult.Success);
        }
示例#24
0
        public UInt64 GetTrackableImageDataBase(UInt64 config_handle)
        {
            UInt64 database_handle = 0;
            var    result          = NativeApi.NRConfigGetTrackableImageDatabase(m_NativeInterface.TrackingHandle, config_handle, ref database_handle);

            NativeErrorListener.Check(result, this, "GetTrackableImageDataBase");
            return(database_handle);
        }
示例#25
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);
        }
        public void InitColorSpace()
        {
            NativeColorSpace colorspace = QualitySettings.activeColorSpace == ColorSpace.Gamma ?
                                          NativeColorSpace.COLOR_SPACE_GAMMA : NativeColorSpace.COLOR_SPACE_LINEAR;
            NativeResult result = NativeApi.NRDisplayInitSetTextureColorSpace(m_MultiDisplayHandle, colorspace);

            NativeErrorListener.Check(result, this, "InitColorSpace");
        }
示例#27
0
        public LostTrackingReason GetTrackingLostReason()
        {
            LostTrackingReason lost_tracking_reason = LostTrackingReason.NONE;
            var result = NativeApi.NRTrackingPoseGetTrackingReason(m_NativeInterface.TrackingHandle, headTrackingHandle, ref lost_tracking_reason);

            NativeErrorListener.Check(result, this, "GetTrackingLostReason");
            return(lost_tracking_reason);
        }
示例#28
0
        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);
        }
        public UInt64 CreateDataBase()
        {
            UInt64 database_handle = 0;
            var    result          = NativeApi.NRTrackableImageDatabaseCreate(m_NativeInterface.TrackingHandle, ref database_handle);

            NativeErrorListener.Check(result, this, "CreateDataBase");
            return(database_handle);
        }
示例#30
0
        public bool Destroy()
        {
            Marshal.FreeHGlobal(FrameInfoPtr);
            NativeResult result = NativeApi.NRRenderingDestroy(m_RenderingHandle);

            NativeErrorListener.Check(result, this, "Destroy");
            return(result == NativeResult.Success);
        }