示例#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);
        }
示例#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);
                }
            }
        }
示例#3
0
 public override bool CollidesWith(VerticalFunc line, out Vector2 crossPoint)
 {
     crossPoint = Vector2.Zero;
     return false;
 }
示例#4
0
 public abstract bool CollidesWith(VerticalFunc line, out Vector2 crossPoint);