public override void ViewDidLoad()
        {
            Title = "ARKit";

            View = sceneView;

            sceneView.ShowsStatistics = true;
            sceneView.AutomaticallyUpdatesLighting = true;

            sceneView.Scene = SCNScene.Create();
            var root = sceneView.Scene.RootNode;

            var cameraNode = SCNNode.Create();

            cameraNode.Camera = SCNCamera.Create();
            root.AddChildNode(cameraNode);

            var lightNode = SCNNode.Create();

            cameraNode.Light = SCNLight.Create();
            root.AddChildNode(lightNode);

            var label = new UILabel(new CGRect(10, 10, 300, 30));

            View.AddSubview(label);
        }
Пример #2
0
 private void initScene()
 {
     scene           = SCNScene.Create();
     sceneView.Scene = scene;
     sceneView.AutoenablesDefaultLighting = true;
     itemsNodeMap = new Dictionary <Item, SCNNode>();
 }
Пример #3
0
        private SCNScene SetupScene()
        {
            var scene = SCNScene.Create();

            SetupInvironment(scene);
            SetupSceneElements(scene);
            vehicleNode = SetupVehicle(scene);

            cameraNode             = SCNNode.Create();
            cameraNode.Camera      = SCNCamera.Create();
            cameraNode.Camera.ZFar = 500f;
            cameraNode.Position    = new SCNVector3(0f, 60f, 50f);
            cameraNode.Rotation    = new SCNVector4(1f, 0f, 0f, -(float)Math.PI / 4f * 0.75f);
            scene.RootNode.AddChildNode(cameraNode);

            return(scene);
        }
Пример #4
0
        public AwesomerRealityViewController()
        {
            Title = "ARKit";

            View = sceneView;

            sceneView.Delegate        = new Del();
            sceneView.ShowsStatistics = true;
            sceneView.AutomaticallyUpdatesLighting = true;

            sceneView.Scene = SCNScene.Create();
            var root = sceneView.Scene.RootNode;

            var cameraNode = SCNNode.Create();

            cameraNode.Camera = SCNCamera.Create();
            root.AddChildNode(cameraNode);

            var lightNode = SCNNode.Create();

            cameraNode.Light = SCNLight.Create();
            root.AddChildNode(lightNode);
        }