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


Java ShapeAttributes类代码示例

本文整理汇总了Java中gov.nasa.worldwind.render.ShapeAttributes的典型用法代码示例。如果您正苦于以下问题:Java ShapeAttributes类的具体用法?Java ShapeAttributes怎么用?Java ShapeAttributes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createPath

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
private Path createPath(final Color color) {
	final ShapeAttributes attrs = new BasicShapeAttributes();
	attrs.setEnableLighting(true);
	attrs.setOutlineMaterial(new Material(color));
	attrs.setInteriorMaterial(new Material(new Color(color.getRed(), color.getGreen(), color.getBlue(), 50), 50));
	attrs.setInteriorOpacity(0.3);
	attrs.setOutlineWidth(_mapLineThickness);
	attrs.setOutlineOpacity(0.7);
	final Path path = new Path();
	path.setExtrude(true);
	path.setAttributes(attrs);
	path.setVisible(true);
	path.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND);
	path.setPathType(AVKey.GREAT_CIRCLE);
	path.setFollowTerrain(true);
	return path;
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:18,代码来源:WWJPanel.java

示例2: RegionShape

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
protected RegionShape(Sector sector) {
    super(sector);

    // Create the default border shape.
    this.setBorder(new SurfaceSector(sector));

    // The edges of the region shape should be constant lines of latitude and longitude.
    this.setPathType(AVKey.LINEAR);
    this.getBorder().setPathType(AVKey.LINEAR);

    // Setup default interior rendering attributes. Note that the interior rendering attributes are
    // configured so only the SurfaceSector's interior is rendered.
    ShapeAttributes interiorAttrs = new BasicShapeAttributes();
    interiorAttrs.setDrawOutline(false);
    interiorAttrs.setInteriorMaterial(new Material(Color.WHITE));
    interiorAttrs.setInteriorOpacity(0.1);
    this.setAttributes(interiorAttrs);
    this.setHighlightAttributes(interiorAttrs);

    // Setup default border rendering attributes. Note that the border rendering attributes are configured
    // so that only the SurfaceSector's outline is rendered.
    ShapeAttributes borderAttrs = new BasicShapeAttributes();
    borderAttrs.setDrawInterior(false);
    borderAttrs.setOutlineMaterial(new Material(Color.RED));
    borderAttrs.setOutlineOpacity(0.7);
    borderAttrs.setOutlineWidth(3);
    this.getBorder().setAttributes(borderAttrs);
    this.getBorder().setHighlightAttributes(borderAttrs);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:30,代码来源:SectorSelector.java

示例3: createConstrainedEdgeAttributes

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
private static ShapeAttributes createConstrainedEdgeAttributes() {
    final ShapeAttributes attributes = new BasicShapeAttributes();
    attributes.setInteriorMaterial(Material.RED);
    attributes.setOutlineMaterial(Material.RED);
    attributes.setDrawOutline(true);
    attributes.setOutlineOpacity(.95);
    attributes.setOutlineWidth(5);
    return attributes;
}
 
开发者ID:ofmooseandmen,项目名称:sherpa,代码行数:10,代码来源:NavigationMeshView.java

示例4: createNavMeshAttributes

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
private static ShapeAttributes createNavMeshAttributes() {
    final ShapeAttributes attributes = new BasicShapeAttributes();
    attributes.setOutlineMaterial(Material.GREEN);
    attributes.setDrawOutline(true);
    attributes.setOutlineOpacity(1);
    attributes.setOutlineWidth(2);
    attributes.setDrawInterior(false);
    return attributes;
}
 
开发者ID:ofmooseandmen,项目名称:sherpa,代码行数:10,代码来源:NavigationMeshView.java

示例5: createObstacleAttributes

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
private static ShapeAttributes createObstacleAttributes() {
    final ShapeAttributes attributes = new BasicShapeAttributes();
    final Material material = new Material(new Color(0, 144, 229));
    attributes.setInteriorMaterial(material);
    attributes.setOutlineMaterial(material);
    attributes.setDrawOutline(true);
    attributes.setInteriorOpacity(0.9);
    attributes.setOutlineOpacity(1);
    attributes.setOutlineWidth(2);
    return attributes;
}
 
开发者ID:ofmooseandmen,项目名称:sherpa,代码行数:12,代码来源:ObstacleEditorView.java

示例6: createObstacleAttributes

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
private static ShapeAttributes createObstacleAttributes() {
    final ShapeAttributes attributes = new BasicShapeAttributes();
    final Material material = new Material(new Color(0, 144, 229));
    attributes.setInteriorMaterial(material);
    attributes.setOutlineMaterial(material);
    attributes.setDrawOutline(true);
    attributes.setInteriorOpacity(0.6);
    attributes.setOutlineOpacity(.95);
    attributes.setOutlineWidth(2);
    return attributes;
}
 
开发者ID:ofmooseandmen,项目名称:sherpa,代码行数:12,代码来源:ObstaclesView.java

示例7: setInteriorColor

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
public void setInteriorColor(Color color) {
    ShapeAttributes attr = this.getAttributes();
    attr.setInteriorMaterial(new Material(color));
    this.setAttributes(attr);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:6,代码来源:SectorSelector.java

示例8: setBorderColor

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
public void setBorderColor(Color color) {
    ShapeAttributes attr = this.getBorder().getAttributes();
    attr.setOutlineMaterial(new Material(color));
    this.getBorder().setAttributes(attr);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:6,代码来源:SectorSelector.java

示例9: setInteriorOpacity

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
public void setInteriorOpacity(double opacity) {
    ShapeAttributes attr = this.getAttributes();
    attr.setInteriorOpacity(opacity);
    this.setAttributes(attr);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:6,代码来源:SectorSelector.java

示例10: setBorderOpacity

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
public void setBorderOpacity(double opacity) {
    ShapeAttributes attr = this.getBorder().getAttributes();
    attr.setOutlineOpacity(opacity);
    this.getBorder().setAttributes(attr);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:6,代码来源:SectorSelector.java

示例11: setBorderWidth

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
public void setBorderWidth(double width) {
    ShapeAttributes attr = this.getBorder().getAttributes();
    attr.setOutlineWidth(width);
    this.getBorder().setAttributes(attr);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:6,代码来源:SectorSelector.java

示例12: setPathHighlighAttributes

import gov.nasa.worldwind.render.ShapeAttributes; //导入依赖的package包/类
/**
 * Set's highlight attributes into the track path.
 * 
 * @param trackPath
 */
private void setPathHighlighAttributes(final ITrackPath trackPath) {

	final TourTrack tourTrack = trackPath.getTourTrack();

	final boolean isHovered = tourTrack.isHovered();
	final boolean isSelected = tourTrack.isSelected();

	final TourTrackConfig trackConfig = TourTrackConfigManager.getActiveConfig();
	final ShapeAttributes shapeAttrs;

	// defaults are for selected/hovered
	boolean isShowPositions;
	double positionsScale;

	if (isHovered && isSelected) {

		shapeAttrs = _hovselAttributes;

		positionsScale = trackConfig.trackPositionSize_HovSel;
		isShowPositions = positionsScale == 0.0 ? false : true;

	} else if (isHovered) {

		shapeAttrs = _hoveredAttributes;

		positionsScale = trackConfig.trackPositionSize_Hovered;
		isShowPositions = positionsScale == 0.0 ? false : true;

	} else if (isSelected) {

		shapeAttrs = _selecedAttributes;

		positionsScale = trackConfig.trackPositionSize_Selected;
		isShowPositions = positionsScale == 0.0 ? false : true;

	} else {

		// not hovered and not selected => normal

		shapeAttrs = _normalAttributes;

		isShowPositions = trackConfig.isShowTrackPosition;
		positionsScale = trackConfig.trackPositionSize;
	}

	final Path path = trackPath.getPath();

	path.setShowPositions(isShowPositions);
	path.setShowPositionsScale(positionsScale / trackConfig.outlineWidth);

	path.setHighlightAttributes(shapeAttrs);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:58,代码来源:TourTrackLayer.java


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