matchfilter.java

来自「OpenMap是一个基于JavaBeansTM的开发工具包。利用OpenMap你」· Java 代码 · 共 59 行

JAVA
59
字号
/** *  */package com.bbn.openmap.geo;public interface MatchFilter {    /**     * do inexpensive comparisons to determine if the two elements     * might intersect.     *      * @return true iff further checks might yield intersection.     */    boolean preConsider(GeoExtent seg, GeoExtent region);    /**     * the distance (in radians) to consider two objects to be     * interacting, that is, intersecting for our purposes.     *      * @return the maximum distance to consider touching. Must be     *         non-negative.     */    double getHRange();    //    // implementations    //    public static class MatchParametersMF implements MatchFilter {        protected double hrange = 0.0;        public MatchParametersMF(MatchParameters params) {            // initialize search parameters from method calls            hrange = params.horizontalRange();        }        public MatchParametersMF(double hrange, int[] vrange, long[] trange) {            this.hrange = hrange;        }        public double getHRange() {            return hrange;        }        public boolean preConsider(GeoExtent seg, GeoExtent region) {            return true;        }    }    public static class ExactMF implements MatchFilter {        public double getHRange() {            return 0.0;        }        public boolean preConsider(GeoExtent seg, GeoExtent region) {            return true;        }    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?