// Joseph Garcia

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Media3D;

namespace MEMS_Visualizer
{
    public class MovementData
    {
        private Vector3DCollection handRotationSequence = new Vector3DCollection();
        public Vector3DCollection HandRotationSequence
        {
            get
            {
                return handRotationSequence;
            }
        }

        private Vector3DCollection thumbRotationSequence = new Vector3DCollection();
        public Vector3DCollection ThumbRotationSequence
        {
            get
            {
                return thumbRotationSequence;
            }
        }

        private List<double> thetaSequence = new List<double>();
        public List<double> ThetaSequence
        {
            get
            {
                return thetaSequence;
            }
        }

        private Vector3D planeVector_1;
        public Vector3D PlaneVector_1
        {
            get
            {
                return planeVector_1;
            }
        }

        private Vector3D planeVector_2;
        public Vector3D PlaneVector_2
        {
            get
            {
                return planeVector_2;
            }
        }

        private Point3D planePoint;
        public Point3D PlanePoint
        {
            get
            {
                return planePoint;
            }
        }

        private bool isVectorProduct;
        public bool IsVectorProduct
        {
            get
            {
                return isVectorProduct;
            }
        }

        // adds rotation to sequence
        public void addRotation(Vector3D handRotation, Vector3D planeVector_1, Vector3D planeVector_2, Point3D planePoint, double angle)
        {
            handRotationSequence.Add(handRotation);
            this.planeVector_1 = planeVector_1;
            this.planeVector_2 = planeVector_2;
            this.planePoint = planePoint;
            thumbRotationSequence.Add(new Vector3D(angle, 0, 0));

            isVectorProduct = true;
        }

        public void addRotation(Vector3D handRotation, Vector3D thumbRotation, double theta)
        {
            handRotationSequence.Add(handRotation);
            thumbRotationSequence.Add(thumbRotation);
            thetaSequence.Add(theta);

            isVectorProduct = false;
        }

        // clears all data structures
        public void clearData()
        {
            handRotationSequence.Clear();
            thumbRotationSequence.Clear();
            thetaSequence.Clear();
        }
    }
}
