Class RigidShapeBuilder
- java.lang.Object
-
- gov.nasa.worldwindx.examples.ApplicationTemplate
-
- 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
andWedge
) as well asExtrudedPolygon
. 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
Nested Classes Modifier and Type Class Description 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
Fields Modifier and Type Field Description protected static java.lang.String
CLEAR_SELECTION
protected static double
DEFAULT_SHAPE_SIZE_METERS
protected static RigidShapeBuilder.AbstractShapeFactory[]
defaultAbstractShapeFactories
protected static RigidShapeBuilder.EditMode[]
defaultEditModes
protected static java.lang.String
EDIT_TEXTURE
protected static java.lang.String
ENABLE_EDIT
protected static java.lang.String
KEEP_SHAPE_ABOVE_SURFACE
protected static java.lang.String
NEW_ABSTRACT_SHAPE
protected static long
nextEntryNumber
protected static java.lang.String
OPEN
protected static java.lang.String
OPEN_IMAGE_FILE
protected static java.lang.String
REMOVE_SELECTED
protected static java.lang.String
SAVE
protected static java.lang.String
SELECTION_CHANGED
protected static java.lang.String
SET_EDIT_MODE
protected static java.lang.String
SHAPE_LAYER_NAME
protected static java.lang.String
SIZE_NEW_SHAPES_TO_VIEWPORT
-
Constructor Summary
Constructors Constructor Description RigidShapeBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ShapeAttributes
getDefaultAttributes()
static java.lang.String
getNextName(java.lang.String base)
static ShapeAttributes
getSelectionAttributes()
static void
main(java.lang.String[] args)
static void
setEditorAttributes(AbstractShapeEditor editor)
-
Methods inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
-
-
-
-
Field Detail
-
SHAPE_LAYER_NAME
protected static final java.lang.String SHAPE_LAYER_NAME
- See Also:
- Constant Field Values
-
CLEAR_SELECTION
protected static final java.lang.String CLEAR_SELECTION
- See Also:
- Constant Field Values
-
SIZE_NEW_SHAPES_TO_VIEWPORT
protected static final java.lang.String SIZE_NEW_SHAPES_TO_VIEWPORT
- See Also:
- Constant Field Values
-
ENABLE_EDIT
protected static final java.lang.String ENABLE_EDIT
- See Also:
- Constant Field Values
-
KEEP_SHAPE_ABOVE_SURFACE
protected static final java.lang.String KEEP_SHAPE_ABOVE_SURFACE
- See Also:
- Constant Field Values
-
SET_EDIT_MODE
protected static final java.lang.String SET_EDIT_MODE
- See Also:
- Constant Field Values
-
NEW_ABSTRACT_SHAPE
protected static final java.lang.String NEW_ABSTRACT_SHAPE
- See Also:
- Constant Field Values
-
REMOVE_SELECTED
protected static final java.lang.String REMOVE_SELECTED
- See Also:
- Constant Field Values
-
OPEN
protected static final java.lang.String OPEN
- See Also:
- Constant Field Values
-
SAVE
protected static final java.lang.String SAVE
- See Also:
- Constant Field Values
-
SELECTION_CHANGED
protected static final java.lang.String SELECTION_CHANGED
- See Also:
- Constant Field Values
-
EDIT_TEXTURE
protected static final java.lang.String EDIT_TEXTURE
- See Also:
- Constant Field Values
-
OPEN_IMAGE_FILE
protected static final java.lang.String OPEN_IMAGE_FILE
- See Also:
- Constant Field Values
-
defaultEditModes
protected static RigidShapeBuilder.EditMode[] defaultEditModes
-
defaultAbstractShapeFactories
protected static RigidShapeBuilder.AbstractShapeFactory[] defaultAbstractShapeFactories
-
DEFAULT_SHAPE_SIZE_METERS
protected static final double DEFAULT_SHAPE_SIZE_METERS
- See Also:
- Constant Field Values
-
nextEntryNumber
protected static long nextEntryNumber
-
-
Method Detail
-
getDefaultAttributes
public static ShapeAttributes getDefaultAttributes()
-
getSelectionAttributes
public static ShapeAttributes getSelectionAttributes()
-
setEditorAttributes
public static void setEditorAttributes(AbstractShapeEditor editor)
-
getNextName
public static java.lang.String getNextName(java.lang.String base)
-
main
public static void main(java.lang.String[] args)
-
-