public interface SectorGeometry extends Renderable
SectorGeometryList
.
Note: Three methods of this class assume that the SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
method of the containing sector geometry list has been called prior to calling them. They are pick(gov.nasa.worldwind.render.DrawContext, java.awt.Point)
, pick(gov.nasa.worldwind.render.DrawContext,
java.util.List)
, and renderMultiTexture(gov.nasa.worldwind.render.DrawContext, int)
.Modifier and Type | Interface and Description |
---|---|
static interface |
SectorGeometry.GeographicTextureCoordinateComputer
An interface for computing texture coordinates for a given location.
|
Modifier and Type | Method and Description |
---|---|
void |
beginRendering(DrawContext dc,
int numTextureUnits)
Indicates that this sector geometry is about to be rendered one or more times.
|
void |
endRendering(DrawContext dc)
Restores state established by
beginRendering(gov.nasa.worldwind.render.DrawContext, int) . |
Extent |
getExtent()
Returns this sector geometry's extent.
|
Sector |
getSector()
Indicates the
Sector covered by this sector geometry. |
Vec4 |
getSurfacePoint(Angle latitude,
Angle longitude,
double metersOffset)
Computes the Cartesian coordinates of a location on the geometry's surface.
|
Intersection[] |
intersect(double elevation)
Computes the geometry's intersections with a globe at a specified elevation.
|
Intersection[] |
intersect(Line line)
Computes the Cartesian coordinates of a line's intersections with the geometry.
|
java.nio.DoubleBuffer |
makeTextureCoordinates(SectorGeometry.GeographicTextureCoordinateComputer computer)
Computes texture coordinates for the geometry.
|
PickedObject[] |
pick(DrawContext dc,
java.util.List<? extends java.awt.Point> pickPoints)
Performs a pick on the geometry.
|
void |
pick(DrawContext dc,
java.awt.Point pickPoint)
Performs a pick on the geometry.
|
void |
render(DrawContext dc,
boolean beginRenderingCalled)
Displays the geometry.
|
void |
renderBoundingVolume(DrawContext dc)
Displays the geometry's bounding volume.
|
void |
renderMultiTexture(DrawContext dc,
int numTextureUnits)
Displays the geometry.
|
void |
renderMultiTexture(DrawContext dc,
int numTextureUnits,
boolean beginRenderingCalled)
Displays the geometry.
|
void |
renderTileID(DrawContext dc)
Displays on the geometry's surface the tessellator level and the minimum and maximum elevations of the sector.
|
void |
renderWireframe(DrawContext dc,
boolean interior,
boolean exterior)
Displays the geometry's tessellation.
|
render
void beginRendering(DrawContext dc, int numTextureUnits)
endRendering(gov.nasa.worldwind.render.DrawContext)
method must be called.dc
- the current draw context.numTextureUnits
- the number of texture units to use.void endRendering(DrawContext dc)
beginRendering(gov.nasa.worldwind.render.DrawContext, int)
.dc
- the current draw context.Extent getExtent()
Sector getSector()
Sector
covered by this sector geometry.Vec4 getSurfacePoint(Angle latitude, Angle longitude, double metersOffset)
latitude
- the position's latitude.longitude
- the position's longitude.metersOffset
- the number of meters to offset the computed position from the geometry's surface.java.lang.IllegalArgumentException
- if either the latitude or longitude are null.Intersection[] intersect(double elevation)
elevation
- the elevation for which intersection points are to be found.Intersection
elements for each,
corresponding to each geometry triangle that intersects the given elevation.Intersection[] intersect(Line line)
line
- the line to intersect.java.lang.IllegalArgumentException
- if the line is null.java.nio.DoubleBuffer makeTextureCoordinates(SectorGeometry.GeographicTextureCoordinateComputer computer)
SectorGeometry.GeographicTextureCoordinateComputer
interface. The computer is invoked once for each
tessellation vertex of the geometry. The latitude and longitude of the location is specified in that invocation.computer
- the texture coordinate computer.java.lang.IllegalArgumentException
- if the computer is null.PickedObject[] pick(DrawContext dc, java.util.List<? extends java.awt.Point> pickPoints)
SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method.dc
- the current draw context.pickPoints
- a list of screen coordinate points to pick test.java.lang.IllegalArgumentException
- if either the draw context or list of pick points is null.void pick(DrawContext dc, java.awt.Point pickPoint)
DrawContext.getPickedObjects()
.
Note: This method assumes that SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method.dc
- the current draw context.pickPoint
- a screen coordinate points to pick test.java.lang.IllegalArgumentException
- if either the draw context or list of pick points is null.void render(DrawContext dc, boolean beginRenderingCalled)
SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method. See the description of the beginRenderingCalled
argument.dc
- the current draw context.beginRenderingCalled
- indicates whether this sector geometry's beginRendering
method has been
called prior to calling this method. True indicated it was called, false indicates
that it was not. Calling java.lang.IllegalArgumentException
- if the draw context is null or the number of texture units is less than one.beginRendering(gov.nasa.worldwind.render.DrawContext, int)
void renderBoundingVolume(DrawContext dc)
dc
- the current draw context.java.lang.IllegalArgumentException
- if the draw context is null.void renderMultiTexture(DrawContext dc, int numTextureUnits)
SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method.dc
- the current draw context.numTextureUnits
- the number of texture units to attempt to use.java.lang.IllegalArgumentException
- if the draw context is null or the number of texture units is less than one.void renderMultiTexture(DrawContext dc, int numTextureUnits, boolean beginRenderingCalled)
SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method. See the description of the beginRenderingCalled
argument.dc
- the current draw context.numTextureUnits
- the number of texture units to attempt to use.beginRenderingCalled
- indicates whether this sector geometry's beginRendering
method has been
called prior to calling this method. True indicated it was called, false indicates
that it was not. Calling java.lang.IllegalArgumentException
- if the draw context is null or the number of texture units is less than one.beginRendering(gov.nasa.worldwind.render.DrawContext, int)
void renderTileID(DrawContext dc)
dc
- the current draw context.java.lang.IllegalArgumentException
- if the draw context is null.void renderWireframe(DrawContext dc, boolean interior, boolean exterior)
dc
- the current draw context.interior
- if true, displays the interior triangles.exterior
- if true, displays the exterior boundary.java.lang.IllegalArgumentException
- if the draw context is null.