Exemple #1
0
        public CameraAutomatic(Vector3[] positions, Vector3 up, float lookAhead)
        {
            MaxTime = positions.Length - 1 - lookAhead;

            this.lookAhead       = lookAhead;
            positionInterpolator = new TrajectoryInterpolator(positions);
            eyeVertical          = up.Normalized();
            this.up = up.Normalized();
        }
Exemple #2
0
        public CameraManual(Vector3[] positions, Vector3[] lookAts, Vector3[] lookUps)
        {
            MaxTime        = positions.Length - 1;
            this.positions = positions;


            // create squad interpolator
            var orientations = new Quaternion[lookAts.Length];

            for (int i = 0; i < orientations.Length; i++)
            {
                orientations[i] = ToQuaternion(positions[i], lookAts[i], lookUps[i]);
            }
            orientationInterpolator = new SquadInterpolator(orientations);
            positionInterpolator    = new TrajectoryInterpolator(positions);
        }