Пример #1
0
        // Token: 0x06000258 RID: 600 RVA: 0x0000A28C File Offset: 0x0000848C
        public static Vector2?IntersectionWith(this Ray2 ray, Segment2 segment)
        {
            IntersectionRay2Segment2 intersectionRay2Segment = new IntersectionRay2Segment2(ray, segment);

            if (intersectionRay2Segment.Find() && (intersectionRay2Segment.IntersectionType == Intersection.Type.IT_POINT || intersectionRay2Segment.IntersectionType == Intersection.Type.IT_SEGMENT))
            {
                return(new Vector2?(intersectionRay2Segment.Point0));
            }
            return(null);
        }
Пример #2
0
        // Token: 0x06000257 RID: 599 RVA: 0x0000A26C File Offset: 0x0000846C
        public static bool Intersects(this Ray2 ray, Segment2 segment)
        {
            IntersectionRay2Segment2 intersectionRay2Segment = new IntersectionRay2Segment2(ray, segment);

            return(intersectionRay2Segment.Find());
        }