📄 basicmarker.java
字号:
/*Copyright (C) 2001, 2008 United States Governmentas represented by the Administrator of theNational Aeronautics and Space Administration.All Rights Reserved.*/package gov.nasa.worldwind.render.markers;import gov.nasa.worldwind.geom.Position;import gov.nasa.worldwind.geom.Vec4;import gov.nasa.worldwind.geom.Angle;import gov.nasa.worldwind.render.DrawContext;import gov.nasa.worldwind.util.Logging;/** * @author tag * @version $Id: BasicMarker.java 7671 2008-11-17 00:18:14Z tgaskins $ */public class BasicMarker implements Marker{ private Position position; // may be null private Angle heading; // may be null // To avoid the memory overhead of creating an attibutes object for every new marker, attributes are // required to be specified at construction. private MarkerAttributes attributes; public BasicMarker(Position position, MarkerAttributes attrs) { if (attrs == null) { String message = Logging.getMessage("nullValue.AttributesIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } this.position = position; this.attributes = attrs; } public BasicMarker(Position position, MarkerAttributes attrs, Angle heading) { if (attrs == null) { String message = Logging.getMessage("nullValue.AttributesIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } this.position = position; this.heading = heading; this.attributes = attrs; } public Position getPosition() { return position; } public void setPosition(Position position) { this.position = position; } public Angle getHeading() { return this.heading; } public void setHeading(Angle heading) { this.heading = heading; } public MarkerAttributes getAttributes() { return attributes; } public void setAttributes(MarkerAttributes attributes) { this.attributes = attributes; } public void render(DrawContext dc, Vec4 point, double radius) { this.attributes.getShape(dc).render(dc, this, point, radius); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -