小编Jas*_*son的帖子

WorldWind Sphere Line Intersection Bug?

我看到了WorldWind的Sphere -Line 交叉逻辑中看似矛盾的行为.我创建了一个Sphere和Line并且它们相交但是然后交集返回null(扫描代码用于注释://***这是它变得糟糕的地方).

这是视觉上发生的事情(线条是灰色的,但很难看到): 球面相交

public class WWTest extends ApplicationTemplate {

    public static class VisualizationFrame extends ApplicationTemplate.AppFrame {

        public VisualizationFrame() {
            super(new Dimension(1200, 1024));
            final Globe globe = getWwd().getModel().getGlobe();

            //Create a sphere at 0,0 on the surface of the Earth wtih a 60 NMi radius
            final Vec4 sphereCenter = globe.computePointFromLocation(LatLon.ZERO);
            final Sphere sphere = new Sphere(sphereCenter, 111120);
            // Draw the sphere
            final RenderableLayer sphereLayer = new RenderableLayer();
            sphereLayer.addRenderable(sphere);

            final RenderableLayer pathLayer = new RenderableLayer();
            // Create a line at 10k …
Run Code Online (Sandbox Code Playgroud)

java intersection computational-geometry worldwind

6
推荐指数
1
解决办法
306
查看次数