NASA World Wind

gov.nasa.worldwindx.examples.shapebuilder
Class RigidShapeBuilder

java.lang.Object
  extended by gov.nasa.worldwindx.examples.ApplicationTemplate
      extended by gov.nasa.worldwindx.examples.shapebuilder.RigidShapeBuilder

public class RigidShapeBuilder
extends ApplicationTemplate

RigidShapeBuilder is a tool for creating and editing 3D shapes and placing them on the globe. Possible shapes include the Rigid Shapes (Ellipsoid, Box, Cylinder, Cone, Pyramid and Wedge) as well as ExtrudedPolygon. The RigidShapeBuilder user interface allows the user to select the desired shape from a dropdown menu, create an instance of it with the click of a button, and specify an "edit mode" for modifying the shape: move, scale, rotate, skew, or texture. Numerous shapes may be created and placed on the globe together, but only one may be selected and edited at any given time.

Keyboard shortcuts allow the user to toggle easily between the various edit modes. The shortcuts are as follows:

Ctrl-Z: move Ctrl-X: scale Ctrl-C: rotate Ctrl-V: skew Ctrl-B: texture

Edited shapes are Restorable and may be saved to or loaded from a file using options in the File menu.


Nested Class Summary
protected static class RigidShapeBuilder.AbstractShapeBuilderController
           
protected static class RigidShapeBuilder.AbstractShapeBuilderModel
           
protected static class RigidShapeBuilder.AbstractShapeBuilderPanel
           
protected static class RigidShapeBuilder.AbstractShapeEntry
          The AbstractShapeEntry class defines a shape entry in the AbstractShapeBuilderModel.
protected static interface RigidShapeBuilder.AbstractShapeFactory
           
protected static class RigidShapeBuilder.AppFrame
           
protected static class RigidShapeBuilder.BoxFactory
           
protected static class RigidShapeBuilder.ConeFactory
           
protected static class RigidShapeBuilder.CylinderFactory
           
protected static class RigidShapeBuilder.EditMode
           
protected static class RigidShapeBuilder.EllipsoidFactory
           
protected static class RigidShapeBuilder.ExtrudedPolygonFactory
           
protected static class RigidShapeBuilder.PyramidFactory
           
protected static class RigidShapeBuilder.WedgeFactory
           
 
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
ApplicationTemplate.AppPanel
 
Field Summary
protected static String CLEAR_SELECTION
           
protected static double DEFAULT_SHAPE_SIZE_METERS
           
protected static RigidShapeBuilder.AbstractShapeFactory[] defaultAbstractShapeFactories
           
protected static RigidShapeBuilder.EditMode[] defaultEditModes
           
protected static String EDIT_TEXTURE
           
protected static String ENABLE_EDIT
           
protected static String KEEP_SHAPE_ABOVE_SURFACE
           
protected static String NEW_ABSTRACT_SHAPE
           
protected static long nextEntryNumber
           
protected static String OPEN
           
protected static String OPEN_IMAGE_FILE
           
protected static String REMOVE_SELECTED
           
protected static String SAVE
           
protected static String SELECTION_CHANGED
           
protected static String SET_EDIT_MODE
           
protected static String SHAPE_LAYER_NAME
           
protected static String SIZE_NEW_SHAPES_TO_VIEWPORT
           
 
Constructor Summary
RigidShapeBuilder()
           
 
Method Summary
static ShapeAttributes getDefaultAttributes()
           
static String getNextName(String base)
           
static ShapeAttributes getSelectionAttributes()
           
static void main(String[] args)
           
static void setEditorAttributes(AbstractShapeEditor editor)
           
 
Methods inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

defaultAbstractShapeFactories

protected static RigidShapeBuilder.AbstractShapeFactory[] defaultAbstractShapeFactories

defaultEditModes

protected static RigidShapeBuilder.EditMode[] defaultEditModes

EDIT_TEXTURE

protected static final String EDIT_TEXTURE
See Also:
Constant Field Values

ENABLE_EDIT

protected static final String ENABLE_EDIT
See Also:
Constant Field Values

KEEP_SHAPE_ABOVE_SURFACE

protected static final String KEEP_SHAPE_ABOVE_SURFACE
See Also:
Constant Field Values

NEW_ABSTRACT_SHAPE

protected static final String NEW_ABSTRACT_SHAPE
See Also:
Constant Field Values

nextEntryNumber

protected static long nextEntryNumber

OPEN

protected static final String OPEN
See Also:
Constant Field Values

OPEN_IMAGE_FILE

protected static final String OPEN_IMAGE_FILE
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

SET_EDIT_MODE

protected static final String SET_EDIT_MODE
See Also:
Constant Field Values

SHAPE_LAYER_NAME

protected static final String SHAPE_LAYER_NAME
See Also:
Constant Field Values

SIZE_NEW_SHAPES_TO_VIEWPORT

protected static final String SIZE_NEW_SHAPES_TO_VIEWPORT
See Also:
Constant Field Values
Constructor Detail

RigidShapeBuilder

public RigidShapeBuilder()
Method Detail

getDefaultAttributes

public static ShapeAttributes getDefaultAttributes()

getNextName

public static String getNextName(String base)

getSelectionAttributes

public static ShapeAttributes getSelectionAttributes()

main

public static void main(String[] args)

setEditorAttributes

public static void setEditorAttributes(AbstractShapeEditor editor)

NASA World Wind