Beispiel #1
0
 public static Matrix4d GetProjectionMatrix(VideoCamera videoCamera, UIImage frame)
 {
     // Aspect is inverted because we rotate the image
     return(Matrix4d.CreatePerspectiveFieldOfView(
                fovy: videoCamera.FieldOfView *Math.PI / 180,
                aspect: frame.Size.Height / frame.Size.Width,
                zNear: 0.01,
                zFar: 4700));
 }
Beispiel #2
0
        public ARViewController()
        {
            locationSensor    = new LocationSensor();
            orientationSensor = new OrientationSensor();

            videoCameraView = new UIImageView {
                Transform = CGAffineTransform.MakeRotation((float)Math.PI / 2),
            };

            videoCamera = new VideoCamera();

            map = new MapOverlay();
        }
Beispiel #3
0
        public ARViewController()
        {
            locationSensor = new LocationSensor ();
            orientationSensor = new OrientationSensor ();

            videoCameraView = new UIImageView {
                Transform = CGAffineTransform.MakeRotation ((float)Math.PI/2),
            };

            videoCamera = new VideoCamera ();

            map = new MapOverlay ();
        }
Beispiel #4
0
 public static Matrix4d GetProjectionMatrix(VideoCamera videoCamera, UIImage frame)
 {
     // Aspect is inverted because we rotate the image
     return Matrix4d.CreatePerspectiveFieldOfView (
         fovy: videoCamera.FieldOfView * Math.PI / 180,
         aspect: frame.Size.Height / frame.Size.Width,
         zNear: 0.01,
         zFar: 4700);
 }