|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.render.airspaces.AbstractAirspace
gov.nasa.worldwind.render.airspaces.Box
public class Box
| Nested Class Summary | |
|---|---|
protected static class |
Box.BoxData
Holds a box's vertex data that's associated with a particular globe. |
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace |
|---|
AbstractAirspace.AirspaceInfo |
| 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 Map<Globe,Box.BoxData> |
boxData
Map indicating the box's vertices associated with a particular globe. |
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 |
MINIMAL_GEOMETRY_PILLARS
|
protected static int |
MINIMAL_GEOMETRY_STACKS
|
protected static int |
SIDE_FACE
|
protected static int |
UPR_FACE
|
| Fields inherited from class gov.nasa.worldwind.render.airspaces.AbstractAirspace |
|---|
airspaceInfo, 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 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 | |
|---|---|
void |
clearVertices()
Removes all of this box's globe-associated vertex data. |
protected Box |
computeExtent(Globe globe,
double verticalExaggeration)
|
protected List<Vec4> |
computeMinimalGeometry(Globe globe,
double verticalExaggeration)
|
protected Vec4 |
computeReferenceCenter(DrawContext dc)
|
static Plane[] |
computeStandardPlanes(Globe globe,
double verticalExaggeration,
Box box)
Returns an array of six Planes that define the plane for each face of the specified box
on the specified globe. |
static Vec4[] |
computeStandardVertices(Globe globe,
double verticalExaggeration,
Box box)
|
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()
A position associated with the object that indicates its aggregate geographic position. |
protected int |
getStacks()
|
Vec4[] |
getVertices()
|
Vec4[] |
getVertices(Globe globe)
Indicates this box's vertices that associated with the specified globe. |
double[] |
getWidths()
|
boolean[] |
isEnableCaps()
|
protected boolean |
isForceCullFace()
|
boolean |
isVerticesValid(Globe globe)
Indicates whether the box's vertices associated with the specific globe are valid for the globe's current state. |
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(Globe globe,
Vec4[] vertices)
Specifies this box's vertices that are associated with the specified globe. |
void |
setVertices(Vec4[] vertices)
|
void |
setWidths(double leftWidth,
double rightWidth)
|
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, 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 |
|---|
protected static final int A_LOW_LEFT
protected static final int A_LOW_RIGHT
protected static final int A_UPR_LEFT
protected static final int A_UPR_RIGHT
protected static final int B_LOW_LEFT
protected static final int B_LOW_RIGHT
protected static final int B_UPR_LEFT
protected static final int B_UPR_RIGHT
protected Map<Globe,Box.BoxData> boxData
null keys. Null keys are used for backward compatibility with the Box accessor methods that do not
specify a globe.
protected static final int DEFAULT_HEIGHT_STACKS
protected static final int DEFAULT_PILLARS
protected static final int DEFAULT_STACKS
public static final int FACE_BACK
public static final int FACE_BOTTOM
public static final int FACE_FRONT
public static final int FACE_LEFT
public static final int FACE_RIGHT
public static final int FACE_TOP
protected static final int LOW_FACE
protected static final int MINIMAL_GEOMETRY_PILLARS
protected static final int MINIMAL_GEOMETRY_STACKS
protected static final int SIDE_FACE
protected static final int UPR_FACE
| Constructor Detail |
|---|
public Box()
public Box(AirspaceAttributes attributes)
public Box(LatLon location1,
LatLon location2,
double leftWidth,
double rightWidth)
| Method Detail |
|---|
public void clearVertices()
protected Box computeExtent(Globe globe,
double verticalExaggeration)
computeExtent in class AbstractAirspace
protected List<Vec4> computeMinimalGeometry(Globe globe,
double verticalExaggeration)
computeMinimalGeometry in class AbstractAirspaceprotected Vec4 computeReferenceCenter(DrawContext dc)
public static Plane[] computeStandardPlanes(Globe globe,
double verticalExaggeration,
Box box)
Planes that define the plane for each face of the specified box
on the specified globe. The each plane may be accessed using the FACE constants in
Box as indices into the array: FACE_TOP, FACE_BOTTOM, FACE_LEFT, FACE_RIGHT, FACE_FRONT, FACE_BACK.
globe - the Globe the box is related to.verticalExaggeration - the vertical exaggeration of the scene.box - the Box to compute the planes for.
Planes for each face of the specified box, in the following order: top,
bottom, left, right, front, back.
public static Vec4[] computeStandardVertices(Globe globe,
double verticalExaggeration,
Box box)
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
doGetRestorableState in class AbstractAirspace
protected void doMoveTo(Position oldRef,
Position newRef)
doMoveTo in class AbstractAirspace
protected void doRenderGeometry(DrawContext dc,
String drawStyle)
doRenderGeometry in class AbstractAirspace
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
doRestoreState in class AbstractAirspaceprotected int getHeightStacks()
public LatLon[] getLocations()
protected int getPillars()
public Position getReferencePosition()
Movable
protected int getStacks()
public Vec4[] getVertices()
public Vec4[] getVertices(Globe globe)
null if no
vertices are currently associated with the specified globe. Specify null to get the vertices that
are not associated with any globe.
globe - the globe the vertices are associated with, or null to get the vertices that are not
associated with any globe.
null to
indicate that no vertices are associated with the globe.public double[] getWidths()
public boolean[] isEnableCaps()
protected boolean isForceCullFace()
public boolean isVerticesValid(Globe globe)
true if this box has any vertex data associated with the globe and the globe state used
to generate the data is equivalent to the globe's current state. This returns false if this box does
not have any vertex data associated with the globe, or if the vertex data is out of date.
globe - the globe the vertices are associated with, or null to get the valid state of the
vertices that are not associated with any globe.
true if this box has vertices associated with the globe which are valid for the globe's
current state, and false otherwise.public void setEnableCaps(boolean enable)
public void setEnableCaps(boolean enableStartCap,
boolean enableEndCap)
public void setEnableEndCap(boolean enable)
public void setEnableStartCap(boolean enable)
protected void setForceCullFace(boolean forceCullFace)
public void setLocations(LatLon location1,
LatLon location2)
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.
IllegalArgumentException - if location1 or location2 is nullprotected void setPillars(int pillars)
protected void setStacks(int stacks)
public void setVertices(Globe globe,
Vec4[] vertices)
null globe to
indicate that the vertices are not associated with any globe. Specify null vertices to remove
vertices associated with the specified globe. This copies the elements of the specified vertices array; changes
to the array after this method do not affect the data held by this box.
globe - the globe the vertices are associated with, or null to indicate that the vertices
are not associated with any globe.vertices - an array of length 8 indicating this box's vertices in model coordinates, or null to
remove vertices associated with the specified globe.
IllegalArgumentException - if the vertices array is not null and has fewer than eight
elements.public void setVertices(Vec4[] vertices)
public void setWidths(double leftWidth,
double rightWidth)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||