程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

WorldWind 图像的高程

发布于2023-03-25 15:04     阅读(1115)     评论(0)     点赞(13)     收藏(2)


Is there a way to put an image in WorldWind at elevation? I'm able to use a Surface Image to place an image on the globe -- but I'd like to have it instead at a given elevation above the terrain, but I'm not finding it in the API.


解决方案


您可以将图像放在 a 上Polygon并将其放置在您想要的任何高度。看一看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);


所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:http://www.javaheidong.com/blog/article/662734/dc52492f3657f241f5a9/

来源:java黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

13 0
收藏该文
已收藏

评论内容:(最多支持255个字符)