Esempio n. 1
0
        public override bool CollidesWith(VerticalFunc line, out Vector2 crossPoint)
        {
            float y = ValueAt(line.x);

            crossPoint = new Vector2(line.x, y);
            bool ret = Line.AreOrdered(line.from, y, line.to) && Line.AreOrdered(from.X, line.x, to.X);//(y <= line.to && y >= line.from);

            return(ret);
        }
Esempio n. 2
0
        private void CastVertical()
        {
            VerticalFunc func = new VerticalFunc(to.X, from.Y, to.Y);

            for (int i = 0; i < lines.Count; i++)
            {
                Vector2 vecOut;
                if (lines[i].funct.CollidesWith(func, out vecOut))
                {
                    contacts.Add(vecOut);
                }
            }
        }
Esempio n. 3
0
 public override bool CollidesWith(VerticalFunc line, out Vector2 crossPoint)
 {
     crossPoint = Vector2.Zero;
     return false;
 }
Esempio n. 4
0
 public abstract bool CollidesWith(VerticalFunc line, out Vector2 crossPoint);