Exemplo n.º 1
0
        /// <summary>
        /// Load the resources for the scene
        /// </summary>
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);
            var configuration   = new ARImageTrackingConfiguration();
            var referenceImages = ARReferenceImage.GetReferenceImagesInGroup("RetroGamesGoImages", null);

            configuration.TrackingImages = referenceImages;
            configuration.MaximumNumberOfTrackedImages = 100;
            this.sceneView.Session.Run(configuration);
        }
Exemplo n.º 2
0
        public override void ViewWillAppear(bool animated)
        {
            var configuration = new ARImageTrackingConfiguration();

            referenceImages = ARReferenceImage.GetReferenceImagesInGroup("Test", null);

            configuration.TrackingImages = referenceImages;

            this.sceneView.Session.Run(configuration);
        }
Exemplo n.º 3
0
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            NSSet <ARReferenceImage> images = ARReferenceImage.GetReferenceImagesInGroup("AR Resources", null);

            sceneView.Session.Run(new ARWorldTrackingConfiguration
            {
                AutoFocusEnabled       = true,
                LightEstimationEnabled = true,
                DetectionImages        = images
            }, ARSessionRunOptions.ResetTracking | ARSessionRunOptions.RemoveExistingAnchors);
        }
Exemplo n.º 4
0
        private void RunSession()
        {
            config?.Dispose();
            sceneView?.Delegate?.Dispose();

            config = new ARWorldTrackingConfiguration();
            config.AutoFocusEnabled             = true;
            config.PlaneDetection               = ARPlaneDetection.Horizontal | ARPlaneDetection.Vertical;
            config.LightEstimationEnabled       = true;
            config.WorldAlignment               = ARWorldAlignment.GravityAndHeading;
            config.DetectionImages              = ARReferenceImage.GetReferenceImagesInGroup("AR Resources", null);
            config.MaximumNumberOfTrackedImages = 1;

            sceneView.Session.Run(config, ARSessionRunOptions.ResetTracking | ARSessionRunOptions.RemoveExistingAnchors);
            sceneView.Delegate = new IrScnDelegate();
        }
Exemplo n.º 5
0
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            var detectionImages = ARReferenceImage.GetReferenceImagesInGroup("AR Resources", null);

            this.sceneView.Session.Run(new ARWorldTrackingConfiguration
            {
                AutoFocusEnabled             = true,
                PlaneDetection               = ARPlaneDetection.Horizontal | ARPlaneDetection.Vertical,
                LightEstimationEnabled       = true,
                WorldAlignment               = ARWorldAlignment.Gravity,
                DetectionImages              = detectionImages,
                MaximumNumberOfTrackedImages = 1
            }, ARSessionRunOptions.ResetTracking | ARSessionRunOptions.RemoveExistingAnchors);
        }
Exemplo n.º 6
0
        private void RunSession()
        {
            config?.Dispose();
            sceneView?.Delegate?.Dispose();

            sceneView.DebugOptions = ARSCNDebugOptions.ShowFeaturePoints;

            //TODO 6.1 Configurando detección de imágenes
            config = new ARWorldTrackingConfiguration();
            config.AutoFocusEnabled             = true;
            config.PlaneDetection               = ARPlaneDetection.Horizontal | ARPlaneDetection.Vertical;
            config.LightEstimationEnabled       = true;
            config.WorldAlignment               = ARWorldAlignment.GravityAndHeading;
            config.DetectionImages              = ARReferenceImage.GetReferenceImagesInGroup("AR Resources", null);;
            config.MaximumNumberOfTrackedImages = 1;

            sceneView.Session.Run(config, ARSessionRunOptions.ResetTracking | ARSessionRunOptions.RemoveExistingAnchors);

            sceneView.Delegate = new ArImageRecognitionScnViewDelegate(Element.Model3D);

            //Permite añadir reflejos a los objetos de la escena
            sceneView.AutoenablesDefaultLighting = true;
        }
Exemplo n.º 7
0
 public override ARConfiguration GetARConfiguration()
 => new ARImageTrackingConfiguration
 {
     TrackingImages = ARReferenceImage.GetReferenceImagesInGroup("cards", null),
     MaximumNumberOfTrackedImages = 4,
 };