如何在WorldWind中绘制具有高程表示的线

Eva*_*eil 6 javafx line worldwind

我想在地球上用高程表示画一条线,如下所示:

高程表示草图

我知道我可以使用折线来表示一条线,但是如何填充线下方的空间?

Tal*_*lon 2

您可以使用路径来画线。setOutlineMaterial 将绘制一个类似于您想要的“窗帘”。

Path path = new Path(pathPositions); //Arraylist of positions
final BasicShapeAttributes attrs = new BasicShapeAttributes();
attrs.setInteriorOpacity(0.25);
attrs.setInteriorMaterial(Material.BLACK);
attrs.setOutlineMaterial(new Material(color));
attrs.setOutlineWidth(width);
path.setAttributes(attrs);
path.setDrawVerticals(true);
path.setAltitudeMode(WorldWind.ABSOLUTE);
Run Code Online (Sandbox Code Playgroud)

查看Path高度模式,您希望它如何跟随地面。