Ejemplo n.º 1
0
        public override Vector2 At(float t, out double aAngle)
        {
            float totalSize = Line1.Size + Line2.Size;

            if (t <= (Line1.Size / totalSize))
            {
                Vector2 Direction = Line1.P2 - Line1.P1;
                Direction.Normalize();
                aAngle = Math.Atan2(Direction.Y, Direction.X);
                return(Line1.At((t) / (Line1.Size / totalSize)));
            }
            else
            {
                Vector2 Direction = Line2.P2 - Line2.P1;
                Direction.Normalize();
                aAngle = Math.Atan2(Direction.Y, Direction.X);
                return(Line2.At((t - (Line1.Size / totalSize)) / (Line2.Size / totalSize)));
            }
        }