/** * Constructs an obstacle path with the specified waypoint positions. * * @param positions the waypoint positions of this obstacle path */ public ObstaclePath(Iterable<? extends Position> positions) { super(positions); this.setAttributes(new BasicShapeAttributes()); this.getAttributes().setOutlineOpacity(0.75); this.getAttributes().setOutlineWidth(2d); this.getAttributes().setEnableLighting(true); this.getAttributes().setDrawInterior(false); this.getAttributes().setDrawOutline(true); this.getAttributes().setOutlineMaterial(Material.PINK); this.setAltitudeMode(WorldWind.ABSOLUTE); this.setPathType(AVKey.GREAT_CIRCLE); this.setShowPositions(true); }
/** * Updates the appearance of this obstacle cylinder. */ protected void updateAppearance() { this.getAttributes().setInteriorMaterial(new Material(ObstacleColor.getColor(activeCost))); if (0 > this.activeCost) { this.getAttributes().setInteriorOpacity(1.0); } else { this.getAttributes().setInteriorOpacity(0.5); } // TODO: elements could change color, transparency or even an associated image/icon }
/** * Constructs an obstacle cylinder with a specified center position, height * and radius. * * @param centerPosition the center position of this obstacle cylinder * @param height the height in meters of this obstacle cylinder * @param radius the radius in meters of this obstacle cylinder * * @see VerticalCylinder#VerticalCylinder(Position, double, double) */ public ObstacleCylinder(Position centerPosition, double height, double radius) { super(centerPosition, height, radius); this.setAttributes(new BasicShapeAttributes()); this.getAttributes().setInteriorOpacity(0.25); this.getAttributes().setEnableLighting(true); this.getAttributes().setDrawInterior(true); this.getAttributes().setDrawOutline(false); }
dpAttrs.setOutlineMaterial(Material.WHITE); dpAttrs.setOutlineWidth(2d);
/** * Updates the appearance of this obstacle path. */ protected void updateAppearance() { this.getAttributes().setOutlineMaterial(new Material(ObstacleColor.getColor(activeCost))); // TODO: elements could change color, transparency or even an associated image/icon }
dpAttrs.setOutlineMaterial(Material.WHITE); dpAttrs.setOutlineWidth(2d);
dpAttrs.setOutlineMaterial(Material.BLACK); dpAttrs.setOutlineWidth(2d);