gov.nasa.worldwindx.examples.shapebuilder
Class RigidShapeEditor
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.RigidShapeEditor
- All Implemented Interfaces:
- AVList, Disposable, MessageListener, Layer, Restorable, WWObject, MouseListener, MouseMotionListener, PropertyChangeListener, EventListener
- Direct Known Subclasses:
- BoxEditor, ConeEditor, CylinderEditor, PyramidEditor, WedgeEditor
public class RigidShapeEditor
- 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 |
|
Method Summary |
protected void |
addVertex(Point mousePoint)
Add a vertex to the polygon's outer boundary. |
protected void |
assembleControlPointAttributes()
|
protected void |
assembleControlPoints(DrawContext dc)
|
protected void |
assembleRotationControlPoints(DrawContext dc)
|
protected void |
assembleScaleControlPoints(DrawContext dc)
|
protected void |
assembleSkewControlPoints(DrawContext dc)
|
protected void |
assembleTextureControlPoints(DrawContext dc)
|
protected void |
assembleTranslationControlPoints(DrawContext dc)
|
protected void |
assembleVertexControlPoints(DrawContext dc)
|
protected void |
changeShapeHeading(Point previousMousePoint,
Point mousePoint)
|
protected void |
changeShapeRoll(Point previousMousePoint,
Point mousePoint)
|
protected void |
changeShapeTilt(Point previousMousePoint,
Point mousePoint)
|
protected Vec4 |
computeAnnotationPosition(Position pos)
|
protected void |
doPick(DrawContext dc,
Point point)
|
protected void |
doRender(DrawContext dc)
|
protected String |
formatMeasurements(Position pos)
|
protected String |
getDisplayString(Position pos)
|
String |
getEditMode()
|
int |
getSelectedFace()
|
RigidShape |
getShape()
|
protected Vec4 |
intersectPolygonAltitudeAt(Line ray)
Determine the point at which a ray intersects a the globe at the elevation of the polygon. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
protected void |
moveControlPoint(RigidShapeEditor.ControlPointMarker controlPoint,
Point moveToPoint)
|
protected void |
moveShape(Point previousMousePoint,
Point mousePoint)
|
protected void |
moveShapeLatitude(Point previousMousePoint,
Point mousePoint)
|
protected void |
moveShapeLongitude(Point previousMousePoint,
Point mousePoint)
|
protected void |
moveTexture(Point previousMousePoint,
Point mousePoint)
|
protected void |
moveTextureCorner(Point previousMousePoint,
Point mousePoint,
Integer corner)
|
protected void |
removeVertex(RigidShapeEditor.ControlPointMarker vertexToRemove)
Remove a vertex from the polygon. |
protected void |
scaleShape(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeAngle(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeDown(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeEast(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeEastWest(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeNorth(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeNortheast(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeNorthSouth(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeRadius(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeSouth(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeSouthwest(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeUp(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeVertical(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleShapeWest(Point previousMousePoint,
Point mousePoint)
|
protected void |
scaleTexture(Point previousMousePoint,
Point mousePoint,
RigidShapeEditor.Direction side)
|
void |
setEditMode(String editMode)
|
void |
setSelectedFace(int selectedFace)
|
void |
setShape(AbstractShape shape)
|
protected void |
setShapeHeight(Point previousMousePoint,
Point mousePoint)
|
protected void |
skewShape(Point previousMousePoint,
Point mousePoint)
|
protected void |
skewShapeEastWest(Point previousMousePoint,
Point mousePoint)
|
protected void |
skewShapeNorthSouth(Point previousMousePoint,
Point mousePoint)
|
protected void |
textureShape(Point previousMousePoint,
Point mousePoint)
|
void |
updateAnnotation(Position pos)
|
| 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 RigidShape activeControlPoint
activeControlPointIndex
protected int activeControlPointIndex
CHANGE_HEADING_ACTION
public static final String CHANGE_HEADING_ACTION
- See Also:
- Constant Field Values
CHANGE_HEIGHT_ACTION
public static final String CHANGE_HEIGHT_ACTION
- See Also:
- Constant Field Values
CHANGE_LATITUDE_ACTION
public static final String CHANGE_LATITUDE_ACTION
- See Also:
- Constant Field Values
CHANGE_LONGITUDE_ACTION
public static final String CHANGE_LONGITUDE_ACTION
- See Also:
- Constant Field Values
CHANGE_ROLL_ACTION
public static final String CHANGE_ROLL_ACTION
- See Also:
- Constant Field Values
CHANGE_SKEW_ACTION
public static final String CHANGE_SKEW_ACTION
- See Also:
- Constant Field Values
CHANGE_TILT_ACTION
public static final String CHANGE_TILT_ACTION
- See Also:
- Constant Field Values
controlPoints
protected List<RigidShape> controlPoints
firstPass
protected boolean firstPass
headingGuideAttributes
protected ShapeAttributes headingGuideAttributes
heightControlAttributes
protected ShapeAttributes heightControlAttributes
intersectionsDispatchThread
protected Thread intersectionsDispatchThread
LOWER_LEFT_UV
public static final Integer LOWER_LEFT_UV
LOWER_RIGHT_UV
public static final Integer LOWER_RIGHT_UV
MOVE_SHAPE_ACTION
public static final String MOVE_SHAPE_ACTION
- See Also:
- Constant Field Values
MOVE_VERTEX_ACTION
public static final String MOVE_VERTEX_ACTION
- See Also:
- Constant Field Values
radiusControlAttributes
protected ShapeAttributes radiusControlAttributes
radiusRodAttributes
protected ShapeAttributes radiusRodAttributes
rollGuideAttributes
protected ShapeAttributes rollGuideAttributes
ROTATION_MODE
public static final String ROTATION_MODE
- See Also:
- Constant Field Values
rotationControlAttributes
protected ShapeAttributes rotationControlAttributes
rotationRodAttributes
protected ShapeAttributes rotationRodAttributes
SCALE_ANGLE_ACTION
public static final String SCALE_ANGLE_ACTION
- See Also:
- Constant Field Values
SCALE_DOWN_ACTION
public static final String SCALE_DOWN_ACTION
- See Also:
- Constant Field Values
SCALE_EAST_ACTION
public static final String SCALE_EAST_ACTION
- See Also:
- Constant Field Values
SCALE_EAST_WEST_ACTION
public static final String SCALE_EAST_WEST_ACTION
- See Also:
- Constant Field Values
SCALE_MODE
public static final String SCALE_MODE
- See Also:
- Constant Field Values
SCALE_NORTH_ACTION
public static final String SCALE_NORTH_ACTION
- See Also:
- Constant Field Values
SCALE_NORTH_SOUTH_ACTION
public static final String SCALE_NORTH_SOUTH_ACTION
- See Also:
- Constant Field Values
SCALE_NORTHEAST_ACTION
public static final String SCALE_NORTHEAST_ACTION
- See Also:
- Constant Field Values
SCALE_NORTHWEST_ACTION
public static final String SCALE_NORTHWEST_ACTION
- See Also:
- Constant Field Values
SCALE_RADIUS_ACTION
public static final String SCALE_RADIUS_ACTION
- See Also:
- Constant Field Values
SCALE_SHAPE_ACTION
public static final String SCALE_SHAPE_ACTION
- See Also:
- Constant Field Values
SCALE_SOUTH_ACTION
public static final String SCALE_SOUTH_ACTION
- See Also:
- Constant Field Values
SCALE_SOUTHEAST_ACTION
public static final String SCALE_SOUTHEAST_ACTION
- See Also:
- Constant Field Values
SCALE_SOUTHWEST_ACTION
public static final String SCALE_SOUTHWEST_ACTION
- See Also:
- Constant Field Values
SCALE_UP_ACTION
public static final String SCALE_UP_ACTION
- See Also:
- Constant Field Values
SCALE_VERTICAL_ACTION
public static final String SCALE_VERTICAL_ACTION
- See Also:
- Constant Field Values
SCALE_WEST_ACTION
public static final String SCALE_WEST_ACTION
- See Also:
- Constant Field Values
scaleControlAttributes
protected ShapeAttributes scaleControlAttributes
scaleRodAttributes
protected ShapeAttributes scaleRodAttributes
selectedFace
protected int selectedFace
SET_TEXTURE_ACTION
public static final String SET_TEXTURE_ACTION
- See Also:
- Constant Field Values
shape
protected RigidShape shape
SKEW_EAST_WEST_ACTION
public static final String SKEW_EAST_WEST_ACTION
- See Also:
- Constant Field Values
SKEW_MODE
public static final String SKEW_MODE
- See Also:
- Constant Field Values
SKEW_NORTH_SOUTH_ACTION
public static final String SKEW_NORTH_SOUTH_ACTION
- See Also:
- Constant Field Values
tempPath
protected Path tempPath
tempPath2
protected Path tempPath2
tempPath3
protected Path tempPath3
TEXTURE_LOWER_LEFT_ACTION
public static final String TEXTURE_LOWER_LEFT_ACTION
- See Also:
- Constant Field Values
TEXTURE_LOWER_RIGHT_ACTION
public static final String TEXTURE_LOWER_RIGHT_ACTION
- See Also:
- Constant Field Values
TEXTURE_MODE
public static final String TEXTURE_MODE
- See Also:
- Constant Field Values
TEXTURE_MOVE_ACTION
public static final String TEXTURE_MOVE_ACTION
- See Also:
- Constant Field Values
TEXTURE_SCALE_DOWN_ACTION
public static final String TEXTURE_SCALE_DOWN_ACTION
- See Also:
- Constant Field Values
TEXTURE_SCALE_LEFT_ACTION
public static final String TEXTURE_SCALE_LEFT_ACTION
- See Also:
- Constant Field Values
TEXTURE_SCALE_RIGHT_ACTION
public static final String TEXTURE_SCALE_RIGHT_ACTION
- See Also:
- Constant Field Values
TEXTURE_SCALE_UP_ACTION
public static final String TEXTURE_SCALE_UP_ACTION
- See Also:
- Constant Field Values
TEXTURE_UPPER_LEFT_ACTION
public static final String TEXTURE_UPPER_LEFT_ACTION
- See Also:
- Constant Field Values
TEXTURE_UPPER_RIGHT_ACTION
public static final String TEXTURE_UPPER_RIGHT_ACTION
- See Also:
- Constant Field Values
textureControlAttributes
protected ShapeAttributes textureControlAttributes
tiltGuideAttributes
protected ShapeAttributes tiltGuideAttributes
TRANSLATION_MODE
public static final String TRANSLATION_MODE
- See Also:
- Constant Field Values
translationControlAttributes
protected ShapeAttributes translationControlAttributes
translationRodAttributes
protected ShapeAttributes translationRodAttributes
UPPER_LEFT_UV
public static final Integer UPPER_LEFT_UV
UPPER_RIGHT_UV
public static final Integer UPPER_RIGHT_UV
vertexControlAttributes
protected BasicMarkerAttributes vertexControlAttributes
RigidShapeEditor
public RigidShapeEditor()
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.
assembleControlPointAttributes
protected void assembleControlPointAttributes()
assembleControlPoints
protected void assembleControlPoints(DrawContext dc)
assembleRotationControlPoints
protected void assembleRotationControlPoints(DrawContext dc)
assembleScaleControlPoints
protected void assembleScaleControlPoints(DrawContext dc)
assembleSkewControlPoints
protected void assembleSkewControlPoints(DrawContext dc)
assembleTextureControlPoints
protected void assembleTextureControlPoints(DrawContext dc)
assembleTranslationControlPoints
protected void assembleTranslationControlPoints(DrawContext dc)
assembleVertexControlPoints
protected void assembleVertexControlPoints(DrawContext dc)
changeShapeHeading
protected void changeShapeHeading(Point previousMousePoint,
Point mousePoint)
changeShapeRoll
protected void changeShapeRoll(Point previousMousePoint,
Point mousePoint)
changeShapeTilt
protected void changeShapeTilt(Point previousMousePoint,
Point mousePoint)
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
getSelectedFace
public int getSelectedFace()
getShape
public RigidShape getShape()
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(RigidShapeEditor.ControlPointMarker controlPoint,
Point moveToPoint)
moveShape
protected void moveShape(Point previousMousePoint,
Point mousePoint)
moveShapeLatitude
protected void moveShapeLatitude(Point previousMousePoint,
Point mousePoint)
moveShapeLongitude
protected void moveShapeLongitude(Point previousMousePoint,
Point mousePoint)
moveTexture
protected void moveTexture(Point previousMousePoint,
Point mousePoint)
moveTextureCorner
protected void moveTextureCorner(Point previousMousePoint,
Point mousePoint,
Integer corner)
removeVertex
protected void removeVertex(RigidShapeEditor.ControlPointMarker vertexToRemove)
- Remove a vertex from the polygon.
- Parameters:
vertexToRemove - the vertex to remove.
scaleShape
protected void scaleShape(Point previousMousePoint,
Point mousePoint)
scaleShapeAngle
protected void scaleShapeAngle(Point previousMousePoint,
Point mousePoint)
scaleShapeDown
protected void scaleShapeDown(Point previousMousePoint,
Point mousePoint)
scaleShapeEast
protected void scaleShapeEast(Point previousMousePoint,
Point mousePoint)
scaleShapeEastWest
protected void scaleShapeEastWest(Point previousMousePoint,
Point mousePoint)
scaleShapeNorth
protected void scaleShapeNorth(Point previousMousePoint,
Point mousePoint)
scaleShapeNortheast
protected void scaleShapeNortheast(Point previousMousePoint,
Point mousePoint)
scaleShapeNorthSouth
protected void scaleShapeNorthSouth(Point previousMousePoint,
Point mousePoint)
scaleShapeRadius
protected void scaleShapeRadius(Point previousMousePoint,
Point mousePoint)
scaleShapeSouth
protected void scaleShapeSouth(Point previousMousePoint,
Point mousePoint)
scaleShapeSouthwest
protected void scaleShapeSouthwest(Point previousMousePoint,
Point mousePoint)
scaleShapeUp
protected void scaleShapeUp(Point previousMousePoint,
Point mousePoint)
scaleShapeVertical
protected void scaleShapeVertical(Point previousMousePoint,
Point mousePoint)
scaleShapeWest
protected void scaleShapeWest(Point previousMousePoint,
Point mousePoint)
scaleTexture
protected void scaleTexture(Point previousMousePoint,
Point mousePoint,
RigidShapeEditor.Direction side)
setEditMode
public void setEditMode(String editMode)
- Specified by:
setEditMode in class AbstractShapeEditor
setSelectedFace
public void setSelectedFace(int selectedFace)
setShape
public void setShape(AbstractShape shape)
- Specified by:
setShape in class AbstractShapeEditor
setShapeHeight
protected void setShapeHeight(Point previousMousePoint,
Point mousePoint)
skewShape
protected void skewShape(Point previousMousePoint,
Point mousePoint)
skewShapeEastWest
protected void skewShapeEastWest(Point previousMousePoint,
Point mousePoint)
skewShapeNorthSouth
protected void skewShapeNorthSouth(Point previousMousePoint,
Point mousePoint)
textureShape
protected void textureShape(Point previousMousePoint,
Point mousePoint)
updateAnnotation
public void updateAnnotation(Position pos)
- Specified by:
updateAnnotation in class AbstractShapeEditor