gov.nasa.worldwindx.examples.shapebuilder
Class ExtrudedPolygonEditor
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
gov.nasa.worldwindx.examples.shapebuilder.AbstractShapeEditor
gov.nasa.worldwindx.examples.shapebuilder.ExtrudedPolygonEditor
- All Implemented Interfaces:
- AVList, Disposable, MessageListener, Layer, Restorable, WWObject, MouseListener, MouseMotionListener, PropertyChangeListener, EventListener
public class ExtrudedPolygonEditor
- extends AbstractShapeEditor
| Fields inherited from class gov.nasa.worldwindx.examples.shapebuilder.AbstractShapeEditor |
aboveGround, ACCUMULATED_LABEL, activeAction, ALTITUDE_LABEL, altitudeMode, ANGLE_LABEL, annotation, annotationAttributes, AREA_LABEL, armed, CENTER_ALTITUDE_LABEL, CENTER_LATITUDE_LABEL, CENTER_LONGITUDE_LABEL, EAST_SKEW_LABEL, editMode, frameTimestamp, HEADING_LABEL, HEIGHT_LABEL, LATITUDE_LABEL, LENGTH_LABEL, LONGITUDE_LABEL, MAJOR_AXIS_LABEL, MINOR_AXIS_LABEL, mousePoint, NORTH_SKEW_LABEL, PERIMETER_LABEL, RADIUS_LABEL, ROLL_LABEL, showAnnotation, TILT_LABEL, unitsFormat, WIDTH_LABEL, wwd |
| Methods inherited from class gov.nasa.worldwindx.examples.shapebuilder.AbstractShapeEditor |
arePositionsRedundant, getAltitudeMode, getAnnotationAttributes, getLabel, getWorldWindow, initializeAnnotation, isAboveGround, isArmed, isShowAnnotation, setAboveGround, setAltitudeMode, setAnnotationAttributes, setArmed, setInitialLabels, setLabel, setShowAnnotation, setWorldWindow |
| Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
createLayerConfigElements, dispose, doPreRender, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMaxEffectiveAltitude, getMinActiveAltitude, getMinEffectiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerConfigDocument, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
activeControlPoint
protected ExtrudedPolygonEditor.ControlPointMarker activeControlPoint
activeControlPointIndex
protected int activeControlPointIndex
CHANGE_HEIGHT_ACTION
public static final String CHANGE_HEIGHT_ACTION
- See Also:
- Constant Field Values
heightControlAttributes
protected BasicMarkerAttributes heightControlAttributes
markerRenderer
protected MarkerRenderer markerRenderer
MOVE_POLYGON_ACTION
public static final String MOVE_POLYGON_ACTION
- See Also:
- Constant Field Values
MOVE_VERTEX_ACTION
public static final String MOVE_VERTEX_ACTION
- See Also:
- Constant Field Values
polygon
protected ExtrudedPolygon polygon
vertexControlAttributes
protected BasicMarkerAttributes vertexControlAttributes
ExtrudedPolygonEditor
public ExtrudedPolygonEditor()
addVertex
protected void addVertex(Point mousePoint)
- Add a vertex to the polygon's outer boundary.
- Parameters:
mousePoint - the point at which the mouse was clicked. The new vertex will be placed as near as possible to
this point, at the elevation of the polygon.
assembleControlPoints
protected void assembleControlPoints(DrawContext dc)
assembleHeightControlPoints
protected void assembleHeightControlPoints()
assembleMarkerAttributes
protected void assembleMarkerAttributes()
assembleVertexControlPoints
protected void assembleVertexControlPoints(DrawContext dc)
computeAnnotationPosition
protected Vec4 computeAnnotationPosition(Position pos)
doPick
protected void doPick(DrawContext dc,
Point point)
- Overrides:
doPick in class AbstractLayer
doRender
protected void doRender(DrawContext dc)
- Specified by:
doRender in class AbstractLayer
formatMeasurements
protected String formatMeasurements(Position pos)
getDisplayString
protected String getDisplayString(Position pos)
getEditMode
public String getEditMode()
- Specified by:
getEditMode in class AbstractShapeEditor
getPolygon
public ExtrudedPolygon getPolygon()
intersectPolygonAltitudeAt
protected Vec4 intersectPolygonAltitudeAt(Line ray)
- Determine the point at which a ray intersects a the globe at the elevation of the polygon.
- Parameters:
ray - Ray to intersect with the globe.
- Returns:
- The point at which the ray intersects the globe at the elevation of the polygon.
mouseClicked
public void mouseClicked(MouseEvent e)
mouseDragged
public void mouseDragged(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
mouseMoved
public void mouseMoved(MouseEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
moveControlPoint
protected void moveControlPoint(ExtrudedPolygonEditor.ControlPointMarker controlPoint,
Point lastMousePoint,
Point moveToPoint)
movePolygon
protected void movePolygon(Point previousMousePoint,
Point mousePoint)
removeVertex
protected void removeVertex(ExtrudedPolygonEditor.ControlPointMarker vertexToRemove)
- Remove a vertex from the polygon.
- Parameters:
vertexToRemove - the vertex to remove.
setEditMode
public void setEditMode(String editMode)
- Specified by:
setEditMode in class AbstractShapeEditor
setPolygon
public void setPolygon(ExtrudedPolygon polygon)
setPolygonHeight
protected void setPolygonHeight(Point previousMousePoint,
Point mousePoint)
setShape
public void setShape(AbstractShape shape)
- Specified by:
setShape in class AbstractShapeEditor
updateAnnotation
public void updateAnnotation(Position pos)
- Specified by:
updateAnnotation in class AbstractShapeEditor