Ejemplo n.º 1
0
        private CameraConfig CreateCameraConfig(IntPtr cameraConfigHandle)
        {
            DeviceCameraDirection facingDirection =
                _nativeSession.CameraConfigApi.GetFacingDirection(cameraConfigHandle);
            int imageWidth    = 0;
            int imageHeight   = 0;
            int textureWidth  = 0;
            int textureHeight = 0;
            int minFps        = 0;
            int maxFps        = 0;
            CameraConfigDepthSensorUsage depthSensorUsage =
                _nativeSession.CameraConfigApi.GetDepthSensorUsage(cameraConfigHandle);
            CameraConfigStereoCameraUsage stereoCameraUsage =
                _nativeSession.CameraConfigApi.GetStereoCameraUsage(cameraConfigHandle);

            _nativeSession.CameraConfigApi.GetImageDimensions(
                cameraConfigHandle, out imageWidth, out imageHeight);
            _nativeSession.CameraConfigApi.GetTextureDimensions(
                cameraConfigHandle, out textureWidth, out textureHeight);
            _nativeSession.CameraConfigApi.GetFpsRange(
                cameraConfigHandle, out minFps, out maxFps);
            return(new CameraConfig(
                       facingDirection,
                       new Vector2(imageWidth, imageHeight),
                       new Vector2(textureWidth, textureHeight),
                       minFps,
                       maxFps,
                       stereoCameraUsage,
                       depthSensorUsage));
        }
Ejemplo n.º 2
0
 internal CameraConfig(Vector2 imageSize, Vector2 textureSize, int minFPS, int maxFPS,
                       CameraConfigDepthSensorUsage depthSensor) : this()
 {
     ImageSize        = imageSize;
     TextureSize      = textureSize;
     MinFPS           = minFPS;
     MaxFPS           = maxFPS;
     DepthSensorUsage = depthSensor;
 }
Ejemplo n.º 3
0
 internal CameraConfig(
     DeviceCameraDirection facingDirection,
     Vector2 imageSize,
     Vector2 textureSize,
     int minFPS,
     int maxFPS,
     CameraConfigStereoCameraUsage stereoCamera,
     CameraConfigDepthSensorUsage depthSensor) : this()
 {
     FacingDirection   = facingDirection;
     ImageSize         = imageSize;
     TextureSize       = textureSize;
     MinFPS            = minFPS;
     MaxFPS            = maxFPS;
     DepthSensorUsage  = depthSensor;
     StereoCameraUsage = stereoCamera;
 }
Ejemplo n.º 4
0
        private CameraConfig CreateCameraConfig(IntPtr cameraConfigHandle)
        {
            int imageWidth    = 0;
            int imageHeight   = 0;
            int textureWidth  = 0;
            int textureHeight = 0;
            int minFps        = 0;
            int maxFps        = 0;
            CameraConfigDepthSensorUsage depthSensorUsage =
                _nativeSession.CameraConfigApi.GetDepthSensorUsage(cameraConfigHandle);

            _nativeSession.CameraConfigApi.GetImageDimensions(
                cameraConfigHandle, out imageWidth, out imageHeight);
            _nativeSession.CameraConfigApi.GetTextureDimensions(
                cameraConfigHandle, out textureWidth, out textureHeight);
            _nativeSession.CameraConfigApi.GetFpsRange(
                cameraConfigHandle, out minFps, out maxFps);

            return(new CameraConfig(new Vector2(imageWidth, imageHeight),
                                    new Vector2(textureWidth, textureHeight), minFps, maxFps, depthSensorUsage));
        }
 /// <summary>
 /// ValueType copy from another ARCoreExtensionsCameraConfigFilter object into this one.
 /// </summary>
 /// <param name="otherFilter">The ARCoreExtensionsCameraConfigFilter to copy from.</param>
 public void CopyFrom(ARCoreExtensionsCameraConfigFilter otherFilter)
 {
     TargetCameraFramerate = otherFilter.TargetCameraFramerate;
     DepthSensorUsage      = otherFilter.DepthSensorUsage;
     StereoCameraUsage     = otherFilter.StereoCameraUsage;
 }