Пример #1
0
        public bool Overlaps(Projection b, out float distance, out int order)
        {
            var startDistance = Math.Abs(this.Start - b.End);
            var endDistance = Math.Abs(this.End - b.Start);

            if (startDistance < endDistance)
            {
                distance = startDistance;
                order = -1;
            }
            else
            {
                distance = endDistance;
                order = 1;
            }

            if (this.Start > b.End)
                return false;

            if (this.End < b.Start)
                return false;

            return true;
        }
Пример #2
0
 public bool Equals(Projection other)
 {
     return this.Start == other.Start && this.End == other.End;
 }
Пример #3
0
 public bool Overlaps(Projection b, out float distance)
 {
     int order;
     return Overlaps(b, out distance, out order);
 }
Пример #4
0
        public bool Overlaps(Projection b)
        {
            if (this.Start > b.End)
                return false;

            if (this.End < b.Start)
                return false;

            return true;
        }
Пример #5
0
 public override Projection Project(Vector2 axis)
 {
     return(Projection.Create(axis, worldVertices));
 }
Пример #6
0
        public bool Overlaps(Projection b, out float distance)
        {
            int order;

            return(Overlaps(b, out distance, out order));
        }
Пример #7
0
 public bool Equals(Projection other)
 {
     return(this.Start == other.Start && this.End == other.End);
 }