亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? boundarycrossing.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
//**********************************************************************////<copyright>////BBN Technologies, a Verizon Company//10 Moulton Street//Cambridge, MA 02138//(617) 873-8000////Copyright (C) BBNT Solutions LLC. All rights reserved.////</copyright>//**********************************************************************////$Source:///cvs/darwars/ambush/aar/src/com/bbn/ambush/mission/MissionHandler.java,v//$//$RCSfile: BoundaryCrossing.java,v $//$Revision: 1.1.2.5 $//$Date: 2005/07/29 13:11:27 $//$Author: dietrick $////**********************************************************************package com.bbn.openmap.geo;import java.util.ArrayList;import java.util.Collection;import java.util.Iterator;import java.util.LinkedList;import java.util.List;/** * The BoundaryCrossing class represents a location where a path * crosses a region. Since a location can represent a region being * left and a region being entered, you can ask it for the out * GeoRegion and the in GeoRegion. Both won't be null at the same * time, but either may be. *  * @author dietrick */public class BoundaryCrossing {    /**     * The Geo location of the crossing.     */    protected Geo geo;    /**     * The GeoRegion that is being entered.     */    protected GeoRegion in;    /**     * The GeoRegion that is being exited.     */    protected GeoRegion out;    /**     * Creates the BoundaryCrossing. The getCrossings() factory method     * will result in BoundaryCrossings being created.     *      * @param p The Geo location     * @param r the GeoRegion being entered/exited     * @param goinin whether the path is goin' in to the region.     */    protected BoundaryCrossing(Geo p, GeoRegion r, boolean goinin) {        geo = p;        if (goinin) {            in = r;        } else {            out = r;        }    }    public Geo getGeo() {        return geo;    }    public GeoRegion getIn() {        return in;    }    public GeoRegion getOut() {        return out;    }    /**     * The main factory method to create BoundaryCrossings. Provides a     * BoundaryCrossing.Collector so that crossing points can be     * retrieved, as well as an iterator over regions intersected.     *      * @param path GeoPath to travel over     * @param regions An ExtentIndex filled with GeoRegions.     * @return BoundaryCrossing.Collector     */    public static Collector getCrossings(GeoPath path, Collection regions) {        Collector collector = new Collector();        CrossingIntersection crossings = new CrossingIntersection(collector);        crossings.consider(path, regions);        return collector;    }    /**     * A Collector is an object that organizes boundary crossings, as     * discovered by CrossingIntersection class.     *      * @author dietrick     */    public static class Collector extends MatchCollector.SetMatchCollector {        List crossings = new ArrayList(10);        List lastSegmentCrossingList;        Geo lastSegmentStartingPoint;        public Collector() {}        /**         * Add a BoundaryCrossing to the collection of crossings.         *          * @param bc         */        protected void addCrossing(BoundaryCrossing bc) {            crossings.add(bc);        }        /**         * Add a BoundaryCrossing associated with a segment and         * region. This is the main thinkin' method, called by the         * CrossingInspector with lists of crossings. This method         * organizes and orders BorderCrossings according to the         * segment order of the path that caused the crossings.         *          * @param c A list of Geos that a segement intersects with a         *        region.         * @param segment GeoSegment         * @param region GeoRegion         */        protected void addCrossing(Collection c, GeoSegment segment,                                   GeoRegion region) {            // We need to get all the BorderCrossings from the current            // segment all together, across regions and place them in            // order. So if the segments matche with the previous            // segment, we need to hold off add them to the crossings            // list until a segment is complete.            // Compact will probably have to look a the            // currentSegmentList to add any leftovers.            Geo start = segment.getSeg()[0];            if (lastSegmentCrossingList != null                    && lastSegmentStartingPoint.distance(start) > 0) {                // The last segment is complete, need to order the BC                // on the list and add them to the crossings.                crossings.addAll(lastSegmentCrossingList);                lastSegmentCrossingList.clear();            } else if (lastSegmentCrossingList == null) {                lastSegmentCrossingList = new ArrayList(10);            }            // The ordered list is for temporarily holding points for            // the current segment as they are placed in the right            // order.            LinkedList orderedList = new LinkedList();            // Everything in the lastSegmentCrossingList has already            // be ordered relative to what's already been searched, so            // we can just add them now to place the new points around            // them accordingly. Also, the lastSegmentCrossingList            // holds BoundaryCrossing objects, and the collection            // passed into this function doesn't have those yet.            orderedList.addAll(lastSegmentCrossingList);            // Clear out the lastSegmetnCrossingList, we'll replenish            // it with the ordered list at the end, so it will be            // ready for the next cycle.            lastSegmentCrossingList.clear();            for (Iterator it = c.iterator(); it.hasNext();) {                Geo current = (Geo) it.next();                double curDist = start.distance(current);                // We just assume that crossing point is going into                // the current region, we'll check later to make sure.                BoundaryCrossing currentBC = new BoundaryCrossing(current, region, true);                int lastCheckedIndex = 0;                BoundaryCrossing lastChecked = null;                for (Iterator it2 = orderedList.iterator(); it2.hasNext(); lastCheckedIndex++) {                    lastChecked = (BoundaryCrossing) it2.next();                    if (curDist < start.distance(lastChecked.geo)) {                        break;                    } else {                        lastChecked = null;                    }                }                if (lastChecked != null) {                    orderedList.add(lastCheckedIndex, currentBC);                } else {                    orderedList.add(currentBC);                }            }            boolean goinin = !Intersection.isPointInPolygon(start,                    region.toPointArray());            for (Iterator it = orderedList.iterator(); it.hasNext();) {                BoundaryCrossing bc = (BoundaryCrossing) it.next();                boolean sameRegion = (bc.in == region);                if (sameRegion) {                    if (!goinin)                        bc.out = bc.in;                    goinin = !goinin;                }                lastSegmentCrossingList.add(bc);            }            // OK, remember at this point that the BoundaryCrossing            // Objects have be.in set to their region, and some have            // region.out set if the boundary reflects an outward            // motion. We're going to resolve this in compact();            lastSegmentStartingPoint = start;        }        /**         * An important method that cleans up the segment/region         * BoundaryCrossing order, and also resolves the         * BoundaryCrossing.in/out settings for regions. Must be         * called before the crossing iterator is retrieved, but the         * BoundaryCrossing method does that.         */        protected void compact() {            if (lastSegmentCrossingList != null                    && lastSegmentCrossingList.size() > 0) {                crossings.addAll(lastSegmentCrossingList);                lastSegmentCrossingList.clear();                lastSegmentCrossingList = null;            }            Object[] bc = crossings.toArray();            crossings = new ArrayList(bc.length);            BoundaryCrossing current, previous = null;            for (int i = 0; i < bc.length; i++) {                current = (BoundaryCrossing) bc[i];                if (previous != null                        && previous.geo.distance(current.geo) == 0.0) {                    // If the distances between points are zero, it's                    // a border crossing and we want to merge these                    // into one point, with the bc.out pointer marking                    // the region being left, and the bc.in marking                    // the receiving region.                    if (previous.out != null)                        previous.in = current.in;                    if (current.out != null) {                        previous.out = current.out;                    }                    continue;                } else {                    // First point or if the distance between points                    // is not zero, if the bc.out is set, then we                    // should set the bc.in to null, just to indicate                    // that the point reflects a crossing from outside                    // any other region into that particular region.                    if (current.out != null) {                        current.in = null;                    }                }                crossings.add(current);                previous = current;            }        }        public Iterator getCrossings() {            compact();            return crossings.iterator();        }    }    /**     * A Intersection class that knows how to call     * BoundaryCrossing.Collector to keep track of the path's     * relationship with the regions.     */    public static class CrossingIntersection extends Intersection {        public CrossingIntersection(Collector collector) {            super(new MatchFilter.ExactMF(), collector);        }        /**         * Calls Intersection.isSegmentNearRegion() to see if segment         * is near the region. We're going to assume that this is         * going to be called with segments ordered as they appear in         * the path, in case the path is kinda crazy, and then we can         * keep track of the crossings in the right order.         */        public boolean considerSegmentXRegion(GeoSegment segment,                                              GeoRegion region) {            List hits = Intersection.segmentNearPoly(segment,                    region.toPointArray(),                    0.0);            if (hits != null) {                ((Collector) collector).addCrossing(hits, segment, region);                return true;            }            return false;        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产视频一区在线观看 | 91视频com| 日本精品视频一区二区三区| 91精品国模一区二区三区| 中文av一区特黄| 麻豆精品久久精品色综合| 91老司机福利 在线| 久久嫩草精品久久久精品| 香蕉成人啪国产精品视频综合网 | 欧美tk丨vk视频| 亚洲国产成人tv| 99热这里都是精品| 国产欧美一区二区精品仙草咪| 性做久久久久久免费观看| 97se亚洲国产综合在线| 欧美国产一区二区| 激情深爱一区二区| 日韩限制级电影在线观看| 一区二区三区精品视频| 91丝袜美腿高跟国产极品老师 | 91超碰这里只有精品国产| 18成人在线观看| 成人v精品蜜桃久久一区| 久久综合给合久久狠狠狠97色69| 美女一区二区视频| 日韩欧美国产高清| 蜜臀av在线播放一区二区三区| 欧美特级限制片免费在线观看| 亚洲品质自拍视频| 91麻豆123| 亚洲精品视频一区二区| 精品国产91久久久久久久妲己| 亚洲一区二区三区影院| 欧洲av一区二区嗯嗯嗯啊| 亚洲激情在线播放| 欧美性欧美巨大黑白大战| 一区二区三区高清| 欧美三级电影网| 午夜一区二区三区视频| 欧美一区二区三区在线观看| 人人超碰91尤物精品国产| 欧美一区2区视频在线观看| 看国产成人h片视频| 欧美va亚洲va| 波多野结衣视频一区| 中文字幕综合网| 欧美日韩一区精品| 免费久久99精品国产| 欧美mv日韩mv亚洲| 成人性视频免费网站| 中文字幕中文字幕在线一区| 在线亚洲一区观看| 日韩成人午夜电影| 久久蜜桃av一区二区天堂| 成人性生交大片免费看视频在线| 国产一区二区三区| 国产精品少妇自拍| 欧美亚洲丝袜传媒另类| 日本女人一区二区三区| 国产人成亚洲第一网站在线播放| av网站免费线看精品| 亚洲国产日韩精品| 精品国产一区久久| 91麻豆swag| 九九精品一区二区| 亚洲日本在线a| 日韩欧美国产精品一区| 91在线视频播放地址| 天堂久久久久va久久久久| 国产日产欧美一区| 欧美男人的天堂一二区| 国产v综合v亚洲欧| 五月激情丁香一区二区三区| 久久久久9999亚洲精品| 在线观看欧美黄色| 国产成人三级在线观看| 天天色综合成人网| 国产精品毛片久久久久久久| 欧美一级免费大片| 91丝袜美女网| 国产一区二区在线影院| 亚洲第一在线综合网站| 国产精品色在线| 精品久久免费看| 欧美撒尿777hd撒尿| 夫妻av一区二区| 麻豆国产欧美日韩综合精品二区| 最新欧美精品一区二区三区| 久久五月婷婷丁香社区| 91精品蜜臀在线一区尤物| 91免费看`日韩一区二区| 国内精品在线播放| 日韩高清欧美激情| 亚洲一区二区高清| 亚洲色图视频免费播放| 国产三级欧美三级日产三级99| 欧美蜜桃一区二区三区| 91色乱码一区二区三区| 国产99久久久久| 精品一区二区三区在线观看 | 欧美酷刑日本凌虐凌虐| 97久久超碰国产精品| 久久精品国产精品亚洲红杏| av成人免费在线观看| 国产一区 二区| 麻豆精品视频在线| 裸体一区二区三区| 日韩精品一二区| 天天操天天综合网| 午夜av区久久| 日精品一区二区| 三级久久三级久久| 日韩国产精品大片| 日韩中文欧美在线| 另类欧美日韩国产在线| 日本伊人午夜精品| 奇米精品一区二区三区四区| 日日夜夜一区二区| 人人精品人人爱| 国内成人精品2018免费看| 麻豆精品在线播放| 狠狠色狠狠色综合系列| 国产aⅴ综合色| 97精品视频在线观看自产线路二| 91香蕉视频在线| 欧美丝袜自拍制服另类| 欧美精品精品一区| 日韩一区二区在线看片| 久久综合一区二区| 国产欧美日本一区视频| 中文字幕亚洲区| 性感美女极品91精品| 美女久久久精品| 岛国精品在线播放| 色一情一伦一子一伦一区| 在线精品视频免费播放| 欧美精品在欧美一区二区少妇| 欧美一卡二卡在线观看| 国产亚洲欧美日韩日本| 中文字幕在线不卡一区二区三区 | 免费精品99久久国产综合精品| 老汉av免费一区二区三区| 国产精品一级二级三级| 成人av午夜影院| 欧美日韩国产高清一区二区| 精品福利视频一区二区三区| 国产午夜精品一区二区三区嫩草 | 欧美网站大全在线观看| 欧美精品日韩一本| 久久久不卡网国产精品一区| 亚洲乱码日产精品bd| 免费在线看成人av| 成人av电影在线| 欧美一级艳片视频免费观看| 国产精品麻豆99久久久久久| 三级精品在线观看| 不卡的av在线| 日韩你懂的在线观看| 亚洲卡通欧美制服中文| 久久国产三级精品| 色综合久久久网| 2020国产精品久久精品美国| 亚洲男人的天堂在线观看| 久久精品国产99国产| 日本电影欧美片| 国产精品网站在线播放| 日本成人在线一区| 在线观看免费视频综合| 国产香蕉久久精品综合网| 午夜精品久久久| 91首页免费视频| 久久亚洲综合色| 日韩成人伦理电影在线观看| 99国产精品国产精品毛片| 久久午夜羞羞影院免费观看| 一区二区免费在线播放| 成人午夜视频网站| 精品播放一区二区| 亚洲高清在线视频| 精品久久久影院| 免费观看在线色综合| 色妞www精品视频| 久久久精品天堂| 激情综合色综合久久| 91精品国产91热久久久做人人| 亚洲一线二线三线视频| 成人免费视频播放| 国产日韩成人精品| 国产成人免费网站| 久久久久综合网| 激情图片小说一区| 久久午夜电影网| 国产在线精品一区二区不卡了| 91精品国产91久久久久久最新毛片| 亚洲一区在线观看网站| 一本到不卡免费一区二区| 综合亚洲深深色噜噜狠狠网站| 成人的网站免费观看| 国产精品丝袜一区| 99免费精品视频|