Пример #1
0
        public static GeomTristrip PolygonToTristip(IPolygon polygon)
        {
            Clip_tristrip clip_strip = new Clip_tristrip();
            Clip_polygon  clip_pol   = ClipWrapper.PolygonTo_Clip_polygon(polygon);

            try
            {
                Polygon2Tristrip(ref clip_pol, ref clip_strip);
                GeomTristrip tristrip = ClipWrapper.Clip_strip_ToTristrip(clip_strip);

                return(tristrip);
            }
            finally
            {
                ClipWrapper.Free_Clip_polygon(clip_pol);
                ClipWrapper.FreeTristrip(ref clip_strip);
            }
        }
Пример #2
0
        public static GeomTristrip GeomPolygonToTristrip(GeomPolygon polygon)
        {
            Clip_tristrip Clip_strip = new Clip_tristrip();
            Clip_polygon  Clip_pol   = ClipWrapper.GeomPolygonTo_Clip_polygon(polygon);

            try
            {
                Polygon2Tristrip(ref Clip_pol, ref Clip_strip);
                GeomTristrip tristrip = ClipWrapper.Clip_strip_ToTristrip(Clip_strip);

                return(tristrip);
            }
            finally
            {
                ClipWrapper.Free_Clip_polygon(Clip_pol);
                ClipWrapper.FreeTristrip(ref Clip_strip);
            }
        }
Пример #3
0
        public static GeomTristrip ClipToTristrip(ClipOperation operation, GeomPolygon subject_polygon, GeomPolygon clip_polygon)
        {
            Clip_tristrip Clip_strip           = new Clip_tristrip();
            Clip_polygon  Clip_subject_polygon = ClipWrapper.GeomPolygonTo_Clip_polygon(subject_polygon);
            Clip_polygon  Clip_clip_polygon    = ClipWrapper.GeomPolygonTo_Clip_polygon(clip_polygon);

            try
            {
                ClipTristrip(ref Clip_subject_polygon, ref Clip_clip_polygon, operation, ref Clip_strip);
                GeomTristrip tristrip = ClipWrapper.Clip_strip_ToTristrip(Clip_strip);

                return(tristrip);
            }
            finally
            {
                ClipWrapper.Free_Clip_polygon(Clip_subject_polygon);
                ClipWrapper.Free_Clip_polygon(Clip_clip_polygon);
                ClipWrapper.FreeTristrip(ref Clip_strip);
            }
        }