private void InitializeWorld() { world = new ARWorld<POI>(this, 50, UpdateElementsOnScreen); world.Initialize(pois); }
public override void ViewDidAppear(bool animated) { try { base.ViewDidAppear(animated); if (cameraFeedUtility == null) { cameraFeedUtility = new CameraFeedUtility(View, CameraView); } cameraFeedUtility.InitAndStartCamera(); if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { locationManager.RequestWhenInUseAuthorization(); } world = new ARWorld<POI>(View, 50, UpdateElementsOnScreen); world.Initialize(pois); PopulateWorld(); world.StartSensors(); locationManager.LocationsUpdated += LocationManager_LocationsUpdated; locationManager.StartUpdatingLocation(); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); RequestWindowFeature(WindowFeatures.NoTitle); SetContentView(Resource.Layout.Main); arMarkerLayout = FindViewById<RelativeLayout>(Resource.Id.arMarkerOverlay); world = new ARWorld<POI>(this, 0.1f, 50, UpdateElementsOnScreen); pois = new List<POI>() { new POI { GeoLocation = new Location { Latitude = -33.832855, Longitude = 151.211989 }, Id = 1, Name = "North" }, new POI { GeoLocation = new Location { Latitude = -33.839878, Longitude = 151.220633 }, Id = 2, Name = "East" }, new POI { GeoLocation = new Location { Latitude = -33.839309, Longitude = 151.195384 }, Id = 3, Name = "West" }, new POI { GeoLocation = new Location { Latitude = -33.848870, Longitude = 151.212342 }, Name = "South", Id = 4 } }; world.Initialize(pois); PopulateWorld(); }