public class Ellipsoid extends RigidShape
RigidShape.Offsets, RigidShape.ShapeData
AbstractShape.AbstractShapeData
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_SUBDIVISIONS |
protected int |
subdivisions |
centerPosition, DEFAULT_GEOMETRY_CACHE_SIZE, detailHint, eastWestRadius, faceCount, GEOMETRY_CACHE_KEY, GEOMETRY_CACHE_NAME, geometryBuilder, heading, imageSources, northSouthRadius, offsets, offsetTextureCoords, previousIntersectionGlobeStateKey, previousIntersectionShapeData, previousIntersectionTerrain, renderExtent, roll, skewEastWest, skewNorthSouth, textures, tilt, verticalRadius
activeAttributes, altitudeMode, BEogsh, currentData, DEFAULT_ALTITUDE_MODE, DEFAULT_GEOMETRY_GENERATION_INTERVAL, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_INTERIOR_MATERIAL, DEFAULT_OUTLINE_MATERIAL, DEFAULT_OUTLINE_PICK_WIDTH, defaultAttributes, delegateOwner, dragEnabled, draggableSupport, enableBatchPicking, enableBatchRendering, enableDepthOffset, highlightAttrs, highlighted, maxExpiryTime, minExpiryTime, normalAttrs, outlinePickWidth, outlineShapeRenderer, pickLayer, pickSupport, referencePosition, sector, shapeDataCache, surfaceShape, VBO_THRESHOLD, viewDistanceExpiration, visible
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
Constructor and Description |
---|
Ellipsoid()
Construct a default ellipsoid with centerPosition ZERO and radii all equal to one.
|
Ellipsoid(Position centerPosition,
double northSouthRadius,
double verticalRadius,
double eastWestRadius)
Construct an ellipsoid from a specified center position and axes lengths.
|
Ellipsoid(Position centerPosition,
double northSouthRadius,
double verticalRadius,
double eastWestRadius,
Angle heading,
Angle tilt,
Angle roll)
Construct an ellipsoid from a specified center position, axes lengths and rotation angles.
|
Modifier and Type | Method and Description |
---|---|
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 |
drawGeometry(DrawContext dc,
int mode,
int count,
int type,
Buffer elementBuffer,
RigidShape.ShapeData shapeData,
int face)
Renders the Ellipsoid, using data from the provided buffer and the given parameters.
|
int |
getSubdivisions() |
String |
isExportFormatSupported(String mimeType)
No export formats supported.
|
protected void |
makeEllipsoid(double a,
double b,
double c,
int subdivisions,
Geometry dest)
Generates ellipsoidal geometry, including the vertices, indices, normals and texture coordinates, tessellated
with the specified number of divisions.
|
protected void |
makeGeometry(RigidShape.ShapeData shapeData)
Sets the Geometry mesh for this Ellipsoid, 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 |
makeUnitSphere(int subdivisions,
Geometry dest)
Generates a unit sphere 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.
|
protected boolean |
sufficientDetail(DrawContext dc,
int subdivisions,
RigidShape.ShapeData shapeData) |
beginDrawing, clearCachedVbos, clearIntersectionGeometry, computeExtent, computeReferencePoint, computeReferencePoint, computeRenderMatrix, computeRenderMatrix, computeRenderMatrixInverse, computeTransformedVertices, createCacheEntry, doDrawInterior, doDrawOutline, doGetRestorableState, doMakeOrderedRenderable, doRestoreState, drawGeometry, fillVBO, getCenterPosition, getCurrentShapeData, getDetailHint, getEastWestRadius, getExtent, getFaceCount, getGeometryBuilder, getGeometryCache, getHeading, getImageSource, getNorthSouthRadius, getOffsets, getReferencePosition, getRestorableState, getRoll, getSector, getSkewEastWest, getSkewNorthSouth, getTexture, getTilt, getVboIds, getVerticalRadius, initialize, intersect, intersect, intersect, intersectFace, isOrderedRenderableValid, isSameAsPreviousTerrain, moveTo, mustApplyTexture, mustApplyTexture, reset, restoreState, setCenterPosition, setDetailHint, setEastWestRadius, setFaceCount, setHeading, setImageSource, setImageSources, setImageSources, setModelViewMatrix, setNorthSouthRadius, setOffset, setRoll, setSkewEastWest, setSkewNorthSouth, setTexture, setTilt, setUpGeometryCache, setVerticalRadius
addOrderedRenderable, checkViewDistanceExpiration, computeExtentFromPositions, computePoint, computePoint, countTriangleVertices, createPickedObject, createSurfaceShape, determineActiveAttributes, doDrag, doDrawOrderedRenderable, drag, drawBatched, drawInterior, drawOrderedRenderable, drawOutline, endDrawing, export, exportAsKML, getActiveAttributes, getAltitudeMode, getAttributes, getCurrentData, getDelegateOwner, getDistanceFromEye, getExtent, getGeometryRegenerationInterval, getHighlightAttributes, getOutlinePickWidth, getReferencePoint, getVboIds, intersectsFrustum, isDragEnabled, isEnableBatchPicking, isEnableBatchRendering, isEnableDepthOffset, isHighlighted, isTerrainDependent, isViewDistanceExpiration, isVisible, makeOrderedRenderable, makeTexture, move, moveTo, mustApplyLighting, mustApplyLighting, mustCreateNormals, mustCreateNormals, mustDrawInterior, mustDrawOutline, pick, prepareToDrawInterior, prepareToDrawOutline, preRender, render, setAltitudeMode, setAttributes, setDelegateOwner, setDragEnabled, setEnableBatchPicking, setEnableBatchRendering, setEnableDepthOffset, setGeometryRegenerationInterval, setHighlightAttributes, setHighlighted, setOutlinePickWidth, setReferencePosition, setViewDistanceExpiration, setVisible, shouldUseVBOs, updateSurfaceShape
onMessage, propertyChange
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected static final int DEFAULT_SUBDIVISIONS
protected int subdivisions
public Ellipsoid()
public Ellipsoid(Position centerPosition, double northSouthRadius, double verticalRadius, double eastWestRadius)
centerPosition
- the ellipsoid's center position.northSouthRadius
- the ellipsoid's north-south radius, in meters.verticalRadius
- the ellipsoid's vertical radius, in meters.eastWestRadius
- the ellipsoid's east-west radius, in meters.IllegalArgumentException
- if the center position is null or any of the radii are not greater than 0.public Ellipsoid(Position centerPosition, double northSouthRadius, double verticalRadius, double eastWestRadius, Angle heading, Angle tilt, Angle roll)
centerPosition
- the ellipsoid's center position.northSouthRadius
- the ellipsoid's north-south radius, in meters.verticalRadius
- the ellipsoid's vertical radius, in meters.eastWestRadius
- the ellipsoid's east-west radius, in meters.heading
- the ellipsoid's azimuth, its rotation about its vertical axis.tilt
- the ellipsoids pitch, its rotation about its east-west axis.roll
- the ellipsoid's roll, its rotation about its north-south axis.protected double computeDetailThreshold()
protected void computeSubdivisions(DrawContext dc, RigidShape.ShapeData shapeData)
computeSubdivisions
in class RigidShape
dc
- 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 AbstractShape
xmlWriter
- 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 drawGeometry(DrawContext dc, int mode, int count, int type, Buffer elementBuffer, RigidShape.ShapeData shapeData, int face)
drawGeometry
in class RigidShape
dc
- 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 shape face currently being drawnpublic int getSubdivisions()
getSubdivisions
in class RigidShape
public String isExportFormatSupported(String mimeType)
isExportFormatSupported
in interface Exportable
isExportFormatSupported
in class AbstractShape
mimeType
- Desired export format.Exportable.FORMAT_SUPPORTED
, Exportable.FORMAT_NOT_SUPPORTED
, or Exportable.FORMAT_PARTIALLY_SUPPORTED
.Exportable.export(String, Object)
protected void makeEllipsoid(double a, double b, double c, int subdivisions, Geometry dest)
a
- the Ellipsoid radius along the east-west axisb
- the Ellipsoid radius along the vertical axisc
- the Ellipsoid radius along the north-south axissubdivisions
- the number of times to subdivide the unit sphere geometrydest
- the Geometry container to hold the computed points, etc.protected void makeGeometry(RigidShape.ShapeData shapeData)
makeGeometry
in class RigidShape
shapeData
- the current shape data.protected void makeUnitSphere(int subdivisions, Geometry dest)
subdivisions
- the number of times to subdivide the unit sphere geometrydest
- the Geometry container to hold the computed points, etc.protected boolean mustRegenerateGeometry(DrawContext dc)
AbstractShape
AbstractShape.AbstractShapeData
must be current when this method is called.mustRegenerateGeometry
in class RigidShape
dc
- the current draw context.protected boolean sufficientDetail(DrawContext dc, int subdivisions, RigidShape.ShapeData shapeData)