Example #1
0
        /// <summary>
        /// Adds a camera at the specified position.
        /// </summary>
        void AddCamera(double x, double y, double z)
        {
            CameraBox camera = new CameraBox();

            camera.PropertyChanged  += CameraPropertyChanged;
            camera.NearPlaneDistance = 0.1;
            camera.FarPlaneDistance  = 1000;
            camera.Position          = new Point3D(x, y, z);
            camera.LookAtOrigin();
            Cameras.Add(camera);
        }
Example #2
0
        /// <summary>
        /// Visualize roll angle and direction to origin (or height above ground).
        /// </summary>
        public void Update(CameraBox Camera)
        {
            Vector3D leftDirection = Camera.LeftDirection.Rotate(Camera.LookDirection, -Camera.RollAngle);

            double length = 0.007;
            Point3D position = Camera.Position + (Camera.NearPlaneDistance + 1.1 * length) * Camera.LookDirection;
            Point3D pt = position + length * leftDirection;
            horizon.SetLocation(pt, pt + 2 * (position - pt));

            Vector3D toTarget = TargetPoint - position;
            toTarget.Normalize();
            targetIndicator.SetLocation(position, position + length * toTarget);
        }
        /// <summary>
        /// Visualize roll angle and direction to origin (or height above ground).
        /// </summary>
        public void Update(CameraBox Camera)
        {
            Vector3D leftDirection = Camera.LeftDirection.Rotate(Camera.LookDirection, -Camera.RollAngle);

            double  length   = 0.007;
            Point3D position = Camera.Position + (Camera.NearPlaneDistance + 1.1 * length) * Camera.LookDirection;
            Point3D pt       = position + length * leftDirection;

            horizon.SetLocation(pt, pt + 2 * (position - pt));

            Vector3D toTarget = TargetPoint - position;

            toTarget.Normalize();
            targetIndicator.SetLocation(position, position + length * toTarget);
        }
Example #4
0
 /// <summary>
 /// Adds a camera at the specified position.
 /// </summary>
 void AddCamera(double x, double y, double z)
 {
     CameraBox camera = new CameraBox();
     camera.PropertyChanged += CameraPropertyChanged;
     camera.NearPlaneDistance = 0.1;
     camera.FarPlaneDistance = 1000;
     camera.Position = new Point3D(x, y, z);
     camera.LookAtOrigin();
     Cameras.Add(camera);
 }