コード例 #1
0
ファイル: SearchArea.java プロジェクト: metsci/worldwind
 /**
  * Create and configure the Path used to render this graphic.
  *
  * @param positions Positions that define the path.
  * @return New path configured with defaults appropriate for this type of graphic.
  */
 protected Path createPath(List<Position> positions) {
   Path path = new Path(positions);
   path.setFollowTerrain(true);
   path.setPathType(AVKey.GREAT_CIRCLE);
   path.setAltitudeMode(WorldWind.CLAMP_TO_GROUND);
   path.setDelegateOwner(this.getActiveDelegateOwner());
   path.setAttributes(this.getActiveShapeAttributes());
   return path;
 }
コード例 #2
0
    protected void addContourShapes(
        List<List<Position>> contourList, double value, RenderableLayer layer) {
      String text = this.textForValue(value);
      Color color = this.colorForValue(value, 1.0); // color for value at 100% brightness

      ShapeAttributes attrs = new BasicShapeAttributes();
      attrs.setOutlineMaterial(new Material(color));
      attrs.setOutlineWidth(2);

      for (List<Position> positions : contourList) {
        Path path = new Path(positions);
        path.setAttributes(attrs);
        path.setAltitudeMode(WorldWind.CLAMP_TO_GROUND);
        path.setFollowTerrain(true);
        path.setValue(AVKey.DISPLAY_NAME, text);
        layer.addRenderable(path);
      }
    }