NASA World Wind

gov.nasa.worldwind.render.airspaces
Class Box

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.render.airspaces.AbstractAirspace
          extended by gov.nasa.worldwind.render.airspaces.Box
All Implemented Interfaces:
AVList, Movable, Airspace, Renderable, Restorable

public class Box
extends AbstractAirspace


Field Summary
protected static int A_LOW_LEFT
           
protected static int A_LOW_RIGHT
           
protected static int A_UPR_LEFT
           
protected static int A_UPR_RIGHT
           
protected static int B_LOW_LEFT
           
protected static int B_LOW_RIGHT
           
protected static int B_UPR_LEFT
           
protected static int B_UPR_RIGHT
           
protected static int DEFAULT_HEIGHT_STACKS
           
protected static int DEFAULT_PILLARS
           
protected static int DEFAULT_STACKS
           
static int FACE_BACK
           
static int FACE_BOTTOM
           
static int FACE_FRONT
           
static int FACE_LEFT
           
static int FACE_RIGHT
           
static int FACE_TOP
           
protected static int LOW_FACE
           
protected static int SIDE_FACE
           
protected static int UPR_FACE
           
 
Fields inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
ARC_SLICES, DISABLE_TERRAIN_CONFORMANCE, EXPIRY_TIME, GEOMETRY_CACHE_KEY, GEOMETRY_CACHE_NAME, GLOBE_KEY, LENGTH_SLICES, LOOPS, PILLARS, SLICES, SPLIT_THRESHOLD, STACKS, SUBDIVISIONS, VERTICAL_EXAGGERATION
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Fields inherited from interface gov.nasa.worldwind.render.airspaces.Airspace
DRAW_STYLE_FILL, DRAW_STYLE_OUTLINE
 
Constructor Summary
Box()
           
Box(AirspaceAttributes attributes)
           
Box(LatLon location1, LatLon location2, double leftWidth, double rightWidth)
           
 
Method Summary
protected  Vec4 computeReferenceCenter(DrawContext dc)
           
static Vec4[] computeStandardVertices(DrawContext dc, Box box)
           
protected  Extent doComputeExtent(DrawContext dc)
           
protected  void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
           
protected  void doMoveTo(Position oldRef, Position newRef)
           
protected  void doRenderGeometry(DrawContext dc, String drawStyle)
           
protected  void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
           
protected  int getHeightStacks()
           
 LatLon[] getLocations()
           
protected  int getPillars()
           
 Position getReferencePosition()
           
protected  int getStacks()
           
 Vec4[] getVertices()
           
 double[] getWidths()
           
 boolean[] isEnableCaps()
           
protected  boolean isForceCullFace()
           
 void setEnableCaps(boolean enable)
           
 void setEnableCaps(boolean enableStartCap, boolean enableEndCap)
           
 void setEnableEndCap(boolean enable)
           
 void setEnableStartCap(boolean enable)
           
protected  void setForceCullFace(boolean forceCullFace)
           
 void setLocations(LatLon location1, LatLon location2)
          Sets the leg's locations, in geographic coordinates.
protected  void setPillars(int pillars)
           
protected  void setStacks(int stacks)
           
 void setVertices(Vec4[] vertices)
           
 void setWidths(double leftWidth, double rightWidth)
           
 
Methods inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace
addDetailLevels, clearElevationMap, computeBoundingCylinder, computeDetailLevel, computeElevationAt, computePointFromPosition, computeReferencePosition, computeSplitSectors, doRender, doRenderExtent, getAltitudes, getAltitudes, getAttributes, getDetailLevels, getExpiryRange, getExpiryTime, getExtent, getGeometryBuilder, getGeometryCache, getRenderer, getRestorableState, isAirspaceCollapsed, isAirspaceVisible, isEnableLevelOfDetail, isExpired, isExtentOutOfDate, isTerrainConforming, isVisible, move, moveTo, nextExpiryTime, render, renderExtent, renderGeometry, restoreState, setAltitude, setAltitudes, setAttributes, setDetailLevels, setEnableLevelOfDetail, setExpiryRange, setExpiryTime, setExtentOutOfDate, setGeometryBuilder, setRenderer, setTerrainConforming, setTerrainConforming, setVisible, updateExpiryCriteria
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Field Detail

A_LOW_LEFT

protected static final int A_LOW_LEFT
See Also:
Constant Field Values

A_LOW_RIGHT

protected static final int A_LOW_RIGHT
See Also:
Constant Field Values

A_UPR_LEFT

protected static final int A_UPR_LEFT
See Also:
Constant Field Values

A_UPR_RIGHT

protected static final int A_UPR_RIGHT
See Also:
Constant Field Values

B_LOW_LEFT

protected static final int B_LOW_LEFT
See Also:
Constant Field Values

B_LOW_RIGHT

protected static final int B_LOW_RIGHT
See Also:
Constant Field Values

B_UPR_LEFT

protected static final int B_UPR_LEFT
See Also:
Constant Field Values

B_UPR_RIGHT

protected static final int B_UPR_RIGHT
See Also:
Constant Field Values

DEFAULT_HEIGHT_STACKS

protected static final int DEFAULT_HEIGHT_STACKS
See Also:
Constant Field Values

DEFAULT_PILLARS

protected static final int DEFAULT_PILLARS
See Also:
Constant Field Values

DEFAULT_STACKS

protected static final int DEFAULT_STACKS
See Also:
Constant Field Values

FACE_BACK

public static final int FACE_BACK
See Also:
Constant Field Values

FACE_BOTTOM

public static final int FACE_BOTTOM
See Also:
Constant Field Values

FACE_FRONT

public static final int FACE_FRONT
See Also:
Constant Field Values

FACE_LEFT

public static final int FACE_LEFT
See Also:
Constant Field Values

FACE_RIGHT

public static final int FACE_RIGHT
See Also:
Constant Field Values

FACE_TOP

public static final int FACE_TOP
See Also:
Constant Field Values

LOW_FACE

protected static final int LOW_FACE
See Also:
Constant Field Values

SIDE_FACE

protected static final int SIDE_FACE
See Also:
Constant Field Values

UPR_FACE

protected static final int UPR_FACE
See Also:
Constant Field Values
Constructor Detail

Box

public Box()

Box

public Box(AirspaceAttributes attributes)

Box

public Box(LatLon location1,
           LatLon location2,
           double leftWidth,
           double rightWidth)
Method Detail

computeReferenceCenter

protected Vec4 computeReferenceCenter(DrawContext dc)

computeStandardVertices

public static Vec4[] computeStandardVertices(DrawContext dc,
                                             Box box)

doComputeExtent

protected Extent doComputeExtent(DrawContext dc)
Specified by:
doComputeExtent in class AbstractAirspace

doGetRestorableState

protected void doGetRestorableState(RestorableSupport rs,
                                    RestorableSupport.StateObject context)
Overrides:
doGetRestorableState in class AbstractAirspace

doMoveTo

protected void doMoveTo(Position oldRef,
                        Position newRef)
Overrides:
doMoveTo in class AbstractAirspace

doRenderGeometry

protected void doRenderGeometry(DrawContext dc,
                                String drawStyle)
Specified by:
doRenderGeometry in class AbstractAirspace

doRestoreState

protected void doRestoreState(RestorableSupport rs,
                              RestorableSupport.StateObject context)
Overrides:
doRestoreState in class AbstractAirspace

getHeightStacks

protected int getHeightStacks()

getLocations

public LatLon[] getLocations()

getPillars

protected int getPillars()

getReferencePosition

public Position getReferencePosition()

getStacks

protected int getStacks()

getVertices

public Vec4[] getVertices()

getWidths

public double[] getWidths()

isEnableCaps

public boolean[] isEnableCaps()

isForceCullFace

protected boolean isForceCullFace()

setEnableCaps

public void setEnableCaps(boolean enable)

setEnableCaps

public void setEnableCaps(boolean enableStartCap,
                          boolean enableEndCap)

setEnableEndCap

public void setEnableEndCap(boolean enable)

setEnableStartCap

public void setEnableStartCap(boolean enable)

setForceCullFace

protected void setForceCullFace(boolean forceCullFace)

setLocations

public void setLocations(LatLon location1,
                         LatLon location2)
Sets the leg's locations, in geographic coordinates.

Parameters:
location1 - geographic coordinates(latitude and longitude) specifying the center of the begining edge.
location2 - geographic coordinates(latitude and longitude) specifying the center of the ending edge.
Throws:
IllegalArgumentException - if location1 or location2 is null

setPillars

protected void setPillars(int pillars)

setStacks

protected void setStacks(int stacks)

setVertices

public void setVertices(Vec4[] vertices)

setWidths

public void setWidths(double leftWidth,
                      double rightWidth)

NASA World Wind