本文整理汇总了Java中gov.nasa.worldwind.render.Material类的典型用法代码示例。如果您正苦于以下问题:Java Material类的具体用法?Java Material怎么用?Java Material使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Material类属于gov.nasa.worldwind.render包,在下文中一共展示了Material类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createPath
import gov.nasa.worldwind.render.Material; //导入依赖的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: getMarkerAttributesForEntity
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
private static BasicMarkerAttributes getMarkerAttributesForEntity(Class<? extends ITridas> clazz, Boolean selected)
{
double opacity = 0.6d;
if(selected) opacity = 1.0d;
if((clazz == TridasObject.class) || (clazz == TridasObjectEx.class))
{
return new BasicMarkerAttributes(Material.RED, BasicMarkerShape.CYLINDER, opacity);
}
else if(clazz == TridasElement.class)
{
return new BasicMarkerAttributes(Material.ORANGE, BasicMarkerShape.CONE, opacity);
}
else if (clazz == TridasDerivedSeries.class)
{
return new BasicMarkerAttributes(Material.YELLOW, BasicMarkerShape.SPHERE, opacity);
}
return defaultAttributes;
}
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:22,代码来源:TridasMarkerLayerBuilder.java
示例3: setPathAttributes_Hovered
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
/**
* Set hovered shape attributes
*
* @param shapeAttributes
*/
private void setPathAttributes_Hovered() {
final TourTrackConfig trackConfig = TourTrackConfigManager.getActiveConfig();
final RGB interiorRGB = trackConfig.interiorColor_Hovered;
final RGB outlineRGB = trackConfig.outlineColor_Hovered;
final Color interiorColor = new Color(interiorRGB.red, interiorRGB.green, interiorRGB.blue);
final Color outlineColor = new Color(outlineRGB.red, outlineRGB.green, outlineRGB.blue);
_hoveredAttributes.setDrawOutline(true);
_hoveredAttributes.setOutlineWidth(trackConfig.outlineWidth);
_hoveredAttributes.setOutlineOpacity(trackConfig.outlineOpacity_Hovered);
_hoveredAttributes.setOutlineMaterial(new Material(outlineColor));
_hoveredAttributes.setDrawInterior(true);
_hoveredAttributes.setInteriorOpacity(trackConfig.interiorOpacity_Hovered);
_hoveredAttributes.setInteriorMaterial(new Material(interiorColor));
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:TourTrackLayer.java
示例4: setPathAttributes_HovSel
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
/**
* Set hovered & selected shape attributes
*
* @param shapeAttributes
*/
private void setPathAttributes_HovSel() {
final TourTrackConfig trackConfig = TourTrackConfigManager.getActiveConfig();
final RGB interiorRGB = trackConfig.interiorColor_HovSel;
final RGB outlineRGB = trackConfig.outlineColor_HovSel;
final Color interiorColor = new Color(interiorRGB.red, interiorRGB.green, interiorRGB.blue);
final Color outlineColor = new Color(outlineRGB.red, outlineRGB.green, outlineRGB.blue);
_hovselAttributes.setDrawOutline(true);
_hovselAttributes.setOutlineWidth(trackConfig.outlineWidth);
_hovselAttributes.setOutlineOpacity(trackConfig.outlineOpacity_HovSel);
_hovselAttributes.setOutlineMaterial(new Material(outlineColor));
_hovselAttributes.setDrawInterior(true);
_hovselAttributes.setInteriorOpacity(trackConfig.interiorOpacity_HovSel);
_hovselAttributes.setInteriorMaterial(new Material(interiorColor));
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:TourTrackLayer.java
示例5: setPathAttributes_Selected
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
/**
* Set selected shape attributes
*
* @param shapeAttributes
*/
private void setPathAttributes_Selected() {
final TourTrackConfig trackConfig = TourTrackConfigManager.getActiveConfig();
final RGB interiorRGB = trackConfig.interiorColor_Selected;
final RGB outlineRGB = trackConfig.outlineColor_Selected;
final Color interiorColor = new Color(interiorRGB.red, interiorRGB.green, interiorRGB.blue);
final Color outlineColor = new Color(outlineRGB.red, outlineRGB.green, outlineRGB.blue);
_selecedAttributes.setDrawOutline(true);
_selecedAttributes.setOutlineWidth(trackConfig.outlineWidth);
_selecedAttributes.setOutlineOpacity(trackConfig.outlineOpacity_Selected);
_selecedAttributes.setOutlineMaterial(new Material(outlineColor));
_selecedAttributes.setDrawInterior(true);
_selecedAttributes.setInteriorOpacity(trackConfig.interiorOpacity_Selected);
_selecedAttributes.setInteriorMaterial(new Material(interiorColor));
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:TourTrackLayer.java
示例6: setProperties
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
public void setProperties(Color fillColor, Double fillOpacity, Double markerSize, String shapeType) {
if (fillColor != null) {
mFillMaterial = new Material(fillColor);
}
if (fillOpacity != null) {
mFillOpacity = fillOpacity;
}
if (markerSize != null) {
mMarkerSize = markerSize;
}
if (shapeType != null) {
mShapeType = shapeType;
}
basicMarkerAttributes.setMaterial(mFillMaterial);
basicMarkerAttributes.setOpacity(mFillOpacity);
basicMarkerAttributes.setMarkerPixels(mMarkerSize);
basicMarkerAttributes.setShapeType(mShapeType);
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:20,代码来源:SimplePointsLayer.java
示例7: FeatureCollectionLinesLayer
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
/**
* Build the layer.
*
* @param title layer name.
* @param featureCollectionLL the featurecollection in latlong.
* @param featureStore the feature store. If not null, then the feature attributes will be editable.
* @param field2ValuesMap an optional map of fields and possible values.
*/
public FeatureCollectionLinesLayer( String title, SimpleFeatureCollection featureCollectionLL,
SimpleFeatureStore featureStore, HashMap<String, String[]> field2ValuesMap ) {
this.title = title;
this.featureStore = featureStore;
this.featureStoreInfo = new FeatureStoreInfo(featureStore, field2ValuesMap);
this.featureCollectionLL = featureCollectionLL;
AirspaceAttributes attrs = new BasicAirspaceAttributes();
attrs.setDrawInterior(true);
attrs.setDrawOutline(true);
attrs.setInteriorMaterial(new Material(Color.WHITE));
attrs.setOutlineMaterial(new Material(Color.BLACK));
attrs.setOutlineWidth(2);
attrs.setEnableAntialiasing(true);
highlightAttrs = new BasicAirspaceAttributes(attrs);
highlightAttrs.setOutlineMaterial(new Material(Color.RED));
setStyle(null);
loadData();
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:29,代码来源:FeatureCollectionLinesLayer.java
示例8: processPlacemark
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
/**
* Process KML Placemark
* @param parentFeature
* @param placemark
*/
private void processPlacemark(Feature parentFeature, Placemark placemark) {
//log.debug("Placemark " + placemark.getName());
Point point = (Point) placemark.getGeometry();
List<Coordinate> coordinates = point.getCoordinates();
for (Coordinate coordinate : coordinates) {
//log.debug("Coordinates: " +coordinate.getLongitude() +", "+ coordinate.getLatitude());
ITRDBMarker mkr = new ITRDBMarker(Position.fromDegrees(coordinate.getLatitude(), coordinate.getLongitude()),
new BasicMarkerAttributes(Material.CYAN, BasicMarkerShape.CUBE, 0.6d));
markers.add(mkr);
}
}
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:20,代码来源:ITRDBMarkerLayerBuilder.java
示例9: setDefaultPositons
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
public void setDefaultPositons() {
final BasicMarkerAttributes attrs = new BasicMarkerAttributes(Material.WHITE, BasicMarkerShape.SPHERE, 1d);
final ArrayList<Marker> markers = new ArrayList<Marker>();
for (final Position position : _positions) {
markers.add(new BasicMarker(position, attrs));
}
setMarkers(markers);
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:12,代码来源:TourTrackLayerWithMarkers.java
示例10: RegionShape
import gov.nasa.worldwind.render.Material; //导入依赖的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
示例11: setStyle
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
public void setStyle( SimpleStyle style ) {
if (style != null) {
mFillMaterial = new Material(style.fillColor);
mFillOpacity = style.fillOpacity;
mMarkerSize = style.shapeSize;
mShapeType = style.shapeType;
}
basicMarkerAttributes.setLabelMaterial(mFillMaterial);
basicMarkerAttributes.setLineMaterial(mFillMaterial);
basicMarkerAttributes.setUsePointAsDefaultImage(true);
basicMarkerAttributes.setScale(mMarkerSize);
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:14,代码来源:FeatureCollectionPointsLayer.java
示例12: setStyle
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
public void setStyle( SimpleStyle style ) {
if (style != null) {
mFillMaterial = new Material(style.fillColor);
mFillOpacity = style.fillOpacity;
mMarkerSize = style.shapeSize;
mShapeType = style.shapeType;
}
basicMarkerAttributes.setMaterial(mFillMaterial);
basicMarkerAttributes.setOpacity(mFillOpacity);
basicMarkerAttributes.setMarkerPixels(mMarkerSize);
basicMarkerAttributes.setShapeType(mShapeType);
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:14,代码来源:SpatialitePointsLayer.java
示例13: createConstrainedEdgeAttributes
import gov.nasa.worldwind.render.Material; //导入依赖的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
示例14: createNavMeshAttributes
import gov.nasa.worldwind.render.Material; //导入依赖的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
示例15: createObstacleAttributes
import gov.nasa.worldwind.render.Material; //导入依赖的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
示例16: createObstacleAttributes
import gov.nasa.worldwind.render.Material; //导入依赖的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
示例17: getMaterial
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
public Material getMaterial()
{
return new Material((Color) btnColor.getBackground());
}
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:5,代码来源:TellervoPointLayerPropertiesDialog.java
示例18: buildMarkerLayer
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
private MarkerLayer buildMarkerLayer()
{
try
{
BasicMarkerAttributes attrs =
new BasicMarkerAttributes(Material.WHITE, BasicMarkerShape.ORIENTED_CONE, 1d); // HEADING_ARROW
markers = new ArrayList<Marker>();
//while (positions.hasNext())
//{
currentPos = new Position(Angle.fromDegrees(29.5),Angle.fromDegrees(-95.1),10.0); // Lat/Lon/Alt
bm = new BasicMarker(currentPos, attrs, Angle.fromDegrees(90.0)); // position, attributes, heading
bm.setHeading(Angle.fromDegrees(90.0));
markers.add(bm);
//}
// make destination marker but don't add it to the map yet
BasicMarkerAttributes attrs2 =
new BasicMarkerAttributes(Material.RED, BasicMarkerShape.SPHERE, 1d); // HEADING_ARROW
destinationMarker = new BasicMarker(currentPos, attrs2, Angle.fromDegrees(90.0));
MarkerLayer layer = new MarkerLayer(markers);
layer.setOverrideMarkerElevation(true);
layer.setElevation(0);
layer.setEnablePickSizeReturn(true);
return layer;
} catch (Exception e)
{
e.printStackTrace();
}
return null;
}
开发者ID:FracturedPlane,项目名称:GpsdInspector,代码行数:42,代码来源:GpsInspector.java
示例19: setInteriorColor
import gov.nasa.worldwind.render.Material; //导入依赖的package包/类
public void setInteriorColor(Color color) {
ShapeAttributes attr = this.getAttributes();
attr.setInteriorMaterial(new Material(color));
this.setAttributes(attr);
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:6,代码来源:SectorSelector.java
示例20: setBorderColor
import gov.nasa.worldwind.render.Material; //导入依赖的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
注:本文中的gov.nasa.worldwind.render.Material类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论