当前位置: 首页>>代码示例>>Java>>正文


Java Angle.add方法代码示例

本文整理汇总了Java中gov.nasa.worldwind.geom.Angle.add方法的典型用法代码示例。如果您正苦于以下问题:Java Angle.add方法的具体用法?Java Angle.add怎么用?Java Angle.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gov.nasa.worldwind.geom.Angle的用法示例。


在下文中一共展示了Angle.add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: computeLocations

import gov.nasa.worldwind.geom.Angle; //导入方法依赖的package包/类
protected ArrayList<LatLon> computeLocations(RectTile tile)
{
    int density = tile.density;
    int numVertices = (density + 3) * (density + 3);

    Angle latMax = tile.sector.getMaxLatitude();
    Angle dLat = tile.sector.getDeltaLat().divide(density);
    Angle lat = tile.sector.getMinLatitude();

    Angle lonMin = tile.sector.getMinLongitude();
    Angle lonMax = tile.sector.getMaxLongitude();
    Angle dLon = tile.sector.getDeltaLon().divide(density);

    ArrayList<LatLon> latlons = new ArrayList<LatLon>(numVertices);
    for (int j = 0; j <= density + 2; j++)
    {
        Angle lon = lonMin;
        for (int i = 0; i <= density + 2; i++)
        {
            latlons.add(new LatLon(lat, lon));

            if (i > density)
                lon = lonMax;
            else if (i != 0)
                lon = lon.add(dLon);

            if (lon.degrees < -180)
                lon = Angle.NEG180;
            else if (lon.degrees > 180)
                lon = Angle.POS180;
        }

        if (j > density)
            lat = latMax;
        else if (j != 0)
            lat = lat.add(dLat);
    }

    return latlons;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:41,代码来源:MYEBSRectangularTessellator.java

示例2: createTopLevelTiles

import gov.nasa.worldwind.geom.Angle; //导入方法依赖的package包/类
private void createTopLevelTiles()
{
	Sector sector = this.levels.getSector();

	Level level = levels.getFirstLevel();
	Angle dLat = level.getTileDelta().getLatitude();
	Angle dLon = level.getTileDelta().getLongitude();
	Angle latOrigin = this.levels.getTileOrigin().getLatitude();
	Angle lonOrigin = this.levels.getTileOrigin().getLongitude();

	// Determine the row and column offset from the common World Wind global tiling origin.
	int firstRow = Tile.computeRow(dLat, sector.getMinLatitude(), latOrigin);
	int firstCol = Tile.computeColumn(dLon, sector.getMinLongitude(), lonOrigin);
	int lastRow = Tile.computeRow(dLat, sector.getMaxLatitude(), latOrigin);
	int lastCol = Tile.computeColumn(dLon, sector.getMaxLongitude(), lonOrigin);

	int nLatTiles = lastRow - firstRow + 1;
	int nLonTiles = lastCol - firstCol + 1;

	this.topLevels = new ArrayList<TextureTile>(nLatTiles * nLonTiles);

	Angle p1 = Tile.computeRowLatitude(firstRow, dLat, latOrigin);
	for (int row = firstRow; row <= lastRow; row++)
	{
		Angle p2;
		p2 = p1.add(dLat);

		Angle t1 = Tile.computeColumnLongitude(firstCol, dLon, lonOrigin);
		for (int col = firstCol; col <= lastCol; col++)
		{
			Angle t2;
			t2 = t1.add(dLon);

			this.topLevels.add(new TextureTile(new Sector(p1, p2, t1, t2), level, row, col));
			t1 = t2;
		}
		p1 = p2;
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:40,代码来源:ScalingTiledImageLayer.java

示例3: createTopLevelTiles

import gov.nasa.worldwind.geom.Angle; //导入方法依赖的package包/类
protected void createTopLevelTiles()
{
	Sector sector = this.levels.getSector();

	Level level = levels.getFirstLevel();
	Angle dLat = level.getTileDelta().getLatitude();
	Angle dLon = level.getTileDelta().getLongitude();
	Angle latOrigin = this.levels.getTileOrigin().getLatitude();
	Angle lonOrigin = this.levels.getTileOrigin().getLongitude();

       // Determine the row and column offset from the common World Wind global tiling origin.
       int firstRow = Tile.computeRow(dLat, sector.getMinLatitude(), latOrigin);
       int firstCol = Tile.computeColumn(dLon, sector.getMinLongitude(), lonOrigin);
       int lastRow = Tile.computeRow(dLat, sector.getMaxLatitude(), latOrigin);
       int lastCol = Tile.computeColumn(dLon, sector.getMaxLongitude(), lonOrigin);

       int nLatTiles = lastRow - firstRow + 1;
       int nLonTiles = lastCol - firstCol + 1;

       this.topLevels = new ArrayList<TextureTile>(nLatTiles * nLonTiles);

       Angle p1 = Tile.computeRowLatitude(firstRow, dLat, latOrigin);
       for (int row = firstRow; row <= lastRow; row++)
       {
           Angle p2;
           p2 = p1.add(dLat);

           Angle t1 = Tile.computeColumnLongitude(firstCol, dLon, lonOrigin);
           for (int col = firstCol; col <= lastCol; col++)
           {
               Angle t2;
               t2 = t1.add(dLon);

               this.topLevels.add(new TextureTile(new Sector(p1, p2, t1, t2), level, row, col));
               t1 = t2;
           }
           p1 = p2;
       }
   }
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:40,代码来源:DynamicImageTileLayer.java


注:本文中的gov.nasa.worldwind.geom.Angle.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。