Esempio n. 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;
        }
Esempio n. 2
0
 public bool Equals(Projection other)
 {
     return this.Start == other.Start && this.End == other.End;
 }
Esempio n. 3
0
 public bool Overlaps(Projection b, out float distance)
 {
     int order;
     return Overlaps(b, out distance, out order);
 }
Esempio n. 4
0
        public bool Overlaps(Projection b)
        {
            if (this.Start > b.End)
                return false;

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

            return true;
        }
Esempio n. 5
0
 public override Projection Project(Vector2 axis)
 {
     return(Projection.Create(axis, worldVertices));
 }
Esempio n. 6
0
        public bool Overlaps(Projection b, out float distance)
        {
            int order;

            return(Overlaps(b, out distance, out order));
        }
Esempio n. 7
0
 public bool Equals(Projection other)
 {
     return(this.Start == other.Start && this.End == other.End);
 }