|
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.WWObjectImpl
gov.nasa.worldwind.render.AbstractShape
gov.nasa.worldwind.render.RigidShape
gov.nasa.worldwind.render.Wedge
public class Wedge
A general cylinder volume defined by a center position, height and radius, or alternatively, by three axis radii.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.RigidShape |
|---|
RigidShape.Offsets, RigidShape.ShapeData |
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractShape |
|---|
AbstractShape.AbstractShapeData |
| Field Summary | |
|---|---|
protected static int |
DEFAULT_SUBDIVISIONS
|
protected int |
faceCount
|
protected int |
subdivisions
|
protected Angle |
wedgeAngle
|
| Fields inherited from class gov.nasa.worldwind.render.RigidShape |
|---|
centerPosition, DEFAULT_GEOMETRY_CACHE_SIZE, detailHint, eastWestRadius, GEOMETRY_CACHE_KEY, GEOMETRY_CACHE_NAME, geometryBuilder, heading, imageSources, northSouthRadius, offsets, offsetTextureCoords, previousIntersectionGlobeStateKey, previousIntersectionShapeData, previousIntersectionTerrain, renderExtent, roll, skewEastWest, skewNorthSouth, textures, tilt, verticalRadius |
| Fields inherited from interface gov.nasa.worldwind.Exportable |
|---|
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED |
| Constructor Summary | |
|---|---|
Wedge()
Construct a wedge with default parameters |
|
Wedge(Position centerPosition,
Angle angle,
double height,
double radius)
Constructs a Wedge from a specified center position, height, radius and angle. |
|
Wedge(Position centerPosition,
Angle angle,
double northSouthRadius,
double verticalRadius,
double eastWestRadius)
Constructs a wedge from a specified center position and axes lengths. |
|
Wedge(Position centerPosition,
Angle angle,
double northSouthRadius,
double verticalRadius,
double eastWestRadius,
Angle heading,
Angle tilt,
Angle roll)
Constructs a wedge from a specified center position, axes lengths and rotation angles. |
|
| Method Summary | |
|---|---|
protected double |
computeDetailThreshold()
Computes a threshold value, based on the current detailHint, for use in the sufficientDetail() calculation. |
protected void |
computeSubdivisions(DrawContext dc,
RigidShape.ShapeData shapeData)
Computes the number of subdivisions necessary to achieve the expected Level of Detail given the shape's relationship to the viewer. |
protected RigidShape.ShapeData |
createIntersectionGeometry(Terrain terrain)
|
protected void |
doExportAsKML(XMLStreamWriter xmlWriter)
Exports shape-specific fields. |
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
drawGeometry(DrawContext dc,
int mode,
int count,
int type,
Buffer elementBuffer,
RigidShape.ShapeData shapeData,
int face)
Renders the wedge, using data from the provided buffer and the given parameters. |
int |
getFaceCount()
Returns the number of separate faces that comprise this shape. |
int |
getSubdivisions()
|
Angle |
getWedgeAngle()
Returns the angle covered by this wedge. |
protected void |
initialize()
Called during construction to establish any subclass-specific state such as different default values than those set by this class. |
String |
isExportFormatSupported(String mimeType)
No export formats supported. |
protected void |
makeGeometry(RigidShape.ShapeData shapeData)
Sets the Geometry mesh for this wedge, either by pulling it from the geometryCache, or by creating it anew if the appropriate geometry does not yet exist in the cache. |
protected void |
makeUnitWedge(int subdivisions,
List<Geometry> meshes)
Generates a unit wedge geometry, including the vertices, indices, normals and texture coordinates, tessellated with the specified number of divisions. |
protected boolean |
mustRegenerateGeometry(DrawContext dc)
Indicates whether this shape's renderable geometry must be recomputed, either as a result of an attribute or property change or the expiration of the geometry regeneration interval. |
void |
setWedgeAngle(Angle angle)
Specifies the angle covered by the wedge. |
protected boolean |
sufficientDetail(DrawContext dc,
int subdivisions,
RigidShape.ShapeData shapeData)
|
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| 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 DEFAULT_SUBDIVISIONS
protected int faceCount
protected int subdivisions
protected Angle wedgeAngle
| Constructor Detail |
|---|
public Wedge()
public Wedge(Position centerPosition,
Angle angle,
double height,
double radius)
centerPosition - the Wedge's center position.height - the Wedge's height, in meters.radius - the radius of the Wedge's base, in meters.angle - the angle covered by the wedge
IllegalArgumentException - if the center position is null, if the wedgeAngle is null or not in [0, 2*PI],
or if any of the radii are not greater than 0.
public Wedge(Position centerPosition,
Angle angle,
double northSouthRadius,
double verticalRadius,
double eastWestRadius)
centerPosition - the wedge's center position.angle - the angle covered by the wedgenorthSouthRadius - the wedge's north-south radius, in meters.verticalRadius - the wedge's vertical radius, in meters.eastWestRadius - the wedge's east-west radius, in meters.
IllegalArgumentException - if the center position is null, if the wedgeAngle is null or not in [0, 2*PI],
or if any of the radii are not greater than 0.
public Wedge(Position centerPosition,
Angle angle,
double northSouthRadius,
double verticalRadius,
double eastWestRadius,
Angle heading,
Angle tilt,
Angle roll)
centerPosition - the wedge's center position.angle - the angle covered by the wedgenorthSouthRadius - the wedge's north-south radius, in meters.verticalRadius - the wedge's vertical radius, in meters.eastWestRadius - the wedge's east-west radius, in meters.heading - the wedge's azimuth, its rotation about its vertical axis.tilt - the wedge pitch, its rotation about its east-west axis.roll - the wedge's roll, its rotation about its north-south axis.
IllegalArgumentException - the centerPosition is null, or if the wedgeAngle is null or not in [0, 2*PI], or
if any of the radii are not greater than 0.| Method Detail |
|---|
protected double computeDetailThreshold()
protected void computeSubdivisions(DrawContext dc,
RigidShape.ShapeData shapeData)
computeSubdivisions in class RigidShapedc - the current drawContext.shapeData - the current globe-specific shape dataprotected RigidShape.ShapeData createIntersectionGeometry(Terrain terrain)
createIntersectionGeometry in class RigidShape
protected void doExportAsKML(XMLStreamWriter xmlWriter)
throws IOException,
XMLStreamException
AbstractShape
doExportAsKML in class AbstractShapexmlWriter - the export writer to write to.
IOException - if an IO error occurs while writing to the output destination.
XMLStreamException - if an exception occurs converting this shape's fields to XML.
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
doGetRestorableState in class RigidShape
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
doRestoreState in class RigidShape
protected void drawGeometry(DrawContext dc,
int mode,
int count,
int type,
Buffer elementBuffer,
RigidShape.ShapeData shapeData,
int face)
drawGeometry in class RigidShapedc - the current draw contextmode - the render modecount - the number of elements to be drawntype - the data type of the elements to be drawnelementBuffer - the buffer containing the list of elements to be drawnshapeData - this shape's current globe-specific shape dataface - the index of the shape face to renderpublic int getFaceCount()
RigidShape
getFaceCount in class RigidShapepublic int getSubdivisions()
getSubdivisions in class RigidShapepublic Angle getWedgeAngle()
protected void initialize()
AbstractShape
initialize in class RigidShapepublic String isExportFormatSupported(String mimeType)
isExportFormatSupported in interface ExportableisExportFormatSupported in class AbstractShapemimeType - Desired export format.
Exportable.FORMAT_SUPPORTED, Exportable.FORMAT_NOT_SUPPORTED, or Exportable.FORMAT_PARTIALLY_SUPPORTED.Exportable.export(String, Object)protected void makeGeometry(RigidShape.ShapeData shapeData)
makeGeometry in class RigidShapeshapeData - this shape's current shape data.
IllegalArgumentException - if the wedgeAngle is null
protected void makeUnitWedge(int subdivisions,
List<Geometry> meshes)
subdivisions - the number of times to subdivide the unit wedge geometrymeshes - the Geometry list to hold the computed points, etc. for all wedge Geometries
IllegalArgumentException - if the wedgeAngle is nullprotected boolean mustRegenerateGeometry(DrawContext dc)
AbstractShapeAbstractShape.AbstractShapeData must be current when this method is called.
mustRegenerateGeometry in class RigidShapedc - the current draw context.
public void setWedgeAngle(Angle angle)
angle - the angle covered by the wedge. Must be in [0, 2*PI].
IllegalArgumentException - if the wedgeAngle is null, or is not in [0, 2*PI].
protected boolean sufficientDetail(DrawContext dc,
int subdivisions,
RigidShape.ShapeData shapeData)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||