gpt4 book ai didi

java - WorldWind 图像高程

转载 作者:行者123 更新时间:2023-11-30 07:43:35 29 4
gpt4 key购买 nike

有没有办法将图像放入 WorldWind 中的海拔高度?我可以使用Surface Image将图像放置在地球上 - 但我希望将其放置在地形上方的给定高度处,但我在 API 中没有找到它。

最佳答案

您可以将图像放在多边形上,并将其放置在您想要的任何高度。看看gov.nasa.worldwind.examples.Polygons。相关行是:

ArrayList<Position> pathLocations = new ArrayList<Position>();
pathLocations.add(Position.fromDegrees(28, -110, 5e4));
pathLocations.add(Position.fromDegrees(35, -108, 5e4));
pathLocations.add(Position.fromDegrees(35, -111, 5e4));
pathLocations.add(Position.fromDegrees(28, -111, 5e4));
pathLocations.add(Position.fromDegrees(28, -110, 5e4));
pgon = new Polygon(pathLocations);
pgon.setValue(AVKey.DISPLAY_NAME, "Has an image");
normalAttributes = new BasicShapeAttributes(normalAttributes);
normalAttributes.setDrawInterior(true);
normalAttributes.setInteriorMaterial(Material.WHITE);
normalAttributes.setInteriorOpacity(1);
pgon.setAttributes(normalAttributes);
pgon.setHighlightAttributes(highlightAttributes);
float[] texCoords = new float[] {0, 0, 1, 0, 1, 1, 0, 1, 0, 0};
pgon.setTextureImageSource("images/32x32-icon-nasa.png", texCoords, 5);

关于java - WorldWind 图像高程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34280516/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com