Skip navigation links
NASA World Wind

Package gov.nasa.worldwindx.examples.shapebuilder

The shapebuilder package contains shape building applications for 3D shapes, including the rigid shapes (Ellipsoid, Box, Cylinder, Cone, Pyramid, Wedge) and ExtrudedPolygon.

See: Description

Package gov.nasa.worldwindx.examples.shapebuilder Description

The shapebuilder package contains shape building applications for 3D shapes, including the rigid shapes (Ellipsoid, Box, Cylinder, Cone, Pyramid, Wedge) and ExtrudedPolygon.

These shape builders rely on a set of editor classes to provide specific editing functionality for each particular type of shape. Each of these editors is descended from the AbstractShapeEditor abstract class, and the editors for the rigid shapes extend further from RigidShapeEditor.

The main shape building application in the package is RigidShapeBuilder. This example 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 or skew. Numerous shapes may be created and placed on the globe together, but only one may be selected and edited at any given time.

Under the hood, the editors work by affixing control points or other affordances to the edited shape that allow the user to interactively adjust parameters of the shape such as width, height, heading, altitude, etc. Each control point is associated with a particular action, and specific implementations of this action can be found in the different editors for the different shapes: BoxEditor, CylinderEditor, ConeEditor, PyramidEditor, WedgeEditor, and ExtrudedPolygonEditor.

The following actions can be performed on all shapes except ExtrudedPolygon:

Move: Select and drag the arrows to constrain movement to latitude, longitude, or altitude only. Select the body of the shape to move it freely.

Scale: Select and drag the red control points to scale along one axis only. Select and drag the blue control point to scale the entire base. Select and drag the body of the shape to scale evenly along all axes at once.

Rotate: Select one of the three discs and drag clockwise or counter-clockwise to rotate the shape in that plane.

Skew: Select and drag the control points to skew the shape either along the east-west axis or the north-south axis.

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

Annotations:Annotations appear during editing to help guide the user in positioning, sizing, and orienting the shapes.

Skip navigation links
NASA World Wind