Пример #1
0
        internal static byte Intersect(Vector3 parStart, Vector3 parEnd)
        {
            XYZXYZ points = new XYZXYZ(parStart.X, parStart.Y, parStart.Z,
                                       parEnd.X, parEnd.Y, parEnd.Z);

            points.Z1 += 2;
            points.Z2 += 2;
            Intersection intersection = new Intersection();
            float        distance     = parStart.DistanceTo(parEnd);
            int          flags        = 0x100111;

            return(_Intersect(ref points, ref distance, ref intersection, flags));
        }
Пример #2
0
        internal static Intersection Intersect(Location parStart, Location parEnd)
        {
            if (!ObjectManager.Instance.IsIngame)
            {
                new Intersection();
            }
            var points = new XYZXYZ(parStart.X, parStart.Y, parStart.Z,
                                    parEnd.X, parEnd.Y, parEnd.Z);

            points.Z1 += 2;
            points.Z2 += 2;
            var intersection = new Intersection();
            var distance     = parStart.GetDistanceTo(parEnd);

            return(MainThread.Instance.Invoke(() =>
            {
                _Intersect(ref points, ref distance, ref intersection, 0x100111, funcs.Intersect);
                return intersection;
            }));
        }
Пример #3
0
 private static extern byte _Intersect(ref XYZXYZ points, ref float distance, ref Intersection intersection,
                                       uint flags, IntPtr Ptr);