gov.nasa.worldwindx.examples
Class AirspaceBuilder
java.lang.Object
gov.nasa.worldwindx.examples.ApplicationTemplate
gov.nasa.worldwindx.examples.AirspaceBuilder
public class AirspaceBuilder
- extends ApplicationTemplate
Illustrates runtime construction of 3D extruded polygons and spheres using World Wind Airspace
shapes. This uses a PolygonEditor and a SphereAirspaceEditor to enable
runtime editing of Polygon airspace and SphereAirspace shapes.
Usage Instructions
Adding and Removing Shapes
Add a shape by selecting either Polygon or
Sphere in the drop down box then clicking New shape. Delete a shape by left-clicking it
then pressing the delete key.
Moving Shapes
Move a shape by left-clicking and dragging it.
Editing Spheres
Note: a sphere must be selected before it can be edited. Select a sphere by
left-clicking it. Adjust a sphere's height by holding the Shift key then left-click and drag
the sphere. Resize a sphere by moving the cursor toward the sphere's edge until a blue control point appears, then
left-click and drag the control point.
Editing Polygons
Note: a polygon must be selected before it can be edited. Select a polygon
by left-clicking it. Add a polygon vertex by holding the Alt key and left-clicking anywhere
near the polygon. Remove a polygon control point by holding the Control key and left-clicking the blue
sphere at the vertex. Move a polygon vertex by left-clicking and dragging it. Change a polygon's bottom or top height
by holding the Shift key then left-click any blue sphere at a vertex and drag it.
Demo Shapes
Select File -> Load Demo Shapes to display a set of polygon airspace shapes built with this editor. The
data for these shapes is located in the World Wind project under src/gov/nasa/worldwindx/examples/data/AirspaceBuilder-DemoShapes.zip.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AIRSPACE_LAYER_NAME
protected static final String AIRSPACE_LAYER_NAME
- See Also:
- Constant Field Values
CLEAR_SELECTION
protected static final String CLEAR_SELECTION
- See Also:
- Constant Field Values
DEFAULT_SHAPE_SIZE_METERS
protected static final double DEFAULT_SHAPE_SIZE_METERS
- See Also:
- Constant Field Values
defaultAirspaceFactories
protected static AirspaceBuilder.AirspaceFactory[] defaultAirspaceFactories
DEMO_AIRSPACES_PATH
protected static final String DEMO_AIRSPACES_PATH
- See Also:
- Constant Field Values
ENABLE_EDIT
protected static final String ENABLE_EDIT
- See Also:
- Constant Field Values
NEW_AIRSPACE
protected static final String NEW_AIRSPACE
- See Also:
- Constant Field Values
nextEntryNumber
protected static long nextEntryNumber
OPEN
protected static final String OPEN
- See Also:
- Constant Field Values
OPEN_DEMO_AIRSPACES
protected static final String OPEN_DEMO_AIRSPACES
- See Also:
- Constant Field Values
OPEN_URL
protected static final String OPEN_URL
- See Also:
- Constant Field Values
REMOVE_SELECTED
protected static final String REMOVE_SELECTED
- See Also:
- Constant Field Values
SAVE
protected static final String SAVE
- See Also:
- Constant Field Values
SELECTION_CHANGED
protected static final String SELECTION_CHANGED
- See Also:
- Constant Field Values
SIZE_NEW_SHAPES_TO_VIEWPORT
protected static final String SIZE_NEW_SHAPES_TO_VIEWPORT
- See Also:
- Constant Field Values
AirspaceBuilder
public AirspaceBuilder()
getDefaultAttributes
public static AirspaceAttributes getDefaultAttributes()
getEditorFor
protected static AirspaceEditor getEditorFor(Airspace airspace)
getIntersectionAttributes
public static AirspaceAttributes getIntersectionAttributes()
getNextName
public static String getNextName(String base)
getSelectionAndIntersectionAttributes
public static AirspaceAttributes getSelectionAndIntersectionAttributes()
getSelectionAttributes
public static AirspaceAttributes getSelectionAttributes()
main
public static void main(String[] args)
setEditorAttributes
public static void setEditorAttributes(AirspaceEditor editor)