Beispiel #1
0
        public void Push(WitFrame witFrame, CatSelection catSelection)
        {
            var delta = (witFrame.Clock - _startTime).TotalMilliseconds;

            if (catSelection == CatSelection.GroupByLinearAcceleration)
            {
                X.Points.Add(new DataPoint(delta, witFrame.LinearAcceleration.X));
                Y.Points.Add(new DataPoint(delta, witFrame.LinearAcceleration.Y));
                Z.Points.Add(new DataPoint(delta, witFrame.LinearAcceleration.Z));
            }
            else if (catSelection == CatSelection.GroupByAngularVelocity)
            {
                X.Points.Add(new DataPoint(delta, witFrame.AngularVelocity.X));
                Y.Points.Add(new DataPoint(delta, witFrame.AngularVelocity.Y));
                Z.Points.Add(new DataPoint(delta, witFrame.AngularVelocity.Z));
            }
            else if (catSelection == CatSelection.GroupByAngle)
            {
                X.Points.Add(new DataPoint(delta, witFrame.Angle.X));
                Y.Points.Add(new DataPoint(delta, witFrame.Angle.Y));
                Z.Points.Add(new DataPoint(delta, witFrame.Angle.Z));
            }

            ClipLeft(X.Points, _clipMax);
            ClipLeft(Y.Points, _clipMax);
            ClipLeft(Z.Points, _clipMax);
        }
Beispiel #2
0
    void Start()
    {
        p1ResetStandPositions = player1StandLightHitBox.transform.position;
        p1ResetLowPositions   = player1LowLightHitBox.transform.position;

        p2ResetStandPositions = player2StandLightHitBox.transform.position;
        p2ResetLowPositions   = player2LowLightHitBox.transform.position;

        p1ResetBoundaries = p1Boundaries.transform.position;
        p2ResetBoundaries = p2Boundaries.transform.position;

        stageSelected = this.GetComponent <StageSelection>();
        catSelected   = this.GetComponent <CatSelection>();

        timerText = GameObject.Find("TimerText").GetComponent <Text>();
    }
Beispiel #3
0
        public GraphDataCat(TimeSpan startTime, string title,
                            ChartConfig chartConfig, CatSelection catSelection)
        {
            _startTime = startTime;
            this.Title = title;
            _clipMax   = chartConfig.ClipMax;

            X = new LineSeries()
            {
                Title     = "X",
                LineStyle = LineStyle.Solid,
                Color     = OxyColor.FromRgb(0xff, 0, 0),
            };

            Y = new LineSeries()
            {
                Title     = "Y",
                LineStyle = LineStyle.Solid,
                Color     = OxyColor.FromRgb(0, 0xff, 0),
            };

            Z = new LineSeries()
            {
                Title     = "Z",
                LineStyle = LineStyle.Solid,
                Color     = OxyColor.FromRgb(0, 0, 0xff),
            };


            switch (catSelection)
            {
            case CatSelection.GroupByLinearAcceleration:
                Axes.Add(new LinearAxis
                {
                    Position = AxisPosition.Left,
                    Minimum  = chartConfig.LinearAccelerationMin,
                    Maximum  = chartConfig.LinearAccelerationMax,
                });
                break;

            case CatSelection.GroupByAngularVelocity:
                Axes.Add(new LinearAxis
                {
                    Position = AxisPosition.Left,
                    Minimum  = chartConfig.AngularVelocityMin,
                    Maximum  = chartConfig.AngularVelocityMax,
                });
                break;

            case CatSelection.GroupByAngle:
                Axes.Add(new LinearAxis
                {
                    Position = AxisPosition.Left,
                    Minimum  = chartConfig.AngleMin,
                    Maximum  = chartConfig.AngleMax,
                });
                break;
            }


            this.IsLegendVisible = true;

            this.Series.Add(X);
            this.Series.Add(Y);
            this.Series.Add(Z);

            //this.Series.Add(new FunctionSeries(Math.Cos, 0, 10, 0.1, "cos(x)"));
        }