protected static class RectangularTessellator.RectTile extends java.lang.Object implements SectorGeometry
SectorGeometry.GeographicTextureCoordinateComputer
Modifier and Type | Field and Description |
---|---|
protected double |
cellSize |
protected int |
density |
protected Extent |
extent |
protected int |
level |
protected int |
maxColorCode |
protected int |
minColorCode |
protected RectangularTessellator.RenderInfo |
ri |
protected Sector |
sector |
protected RectangularTessellator |
tessellator |
Constructor and Description |
---|
RectTile(RectangularTessellator tessellator,
Extent extent,
int level,
int density,
Sector sector) |
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
SectorGeometry.beginRendering(gov.nasa.worldwind.render.DrawContext, int) . |
double |
getCellSize() |
int |
getDensity() |
Extent |
getExtent()
Returns this sector geometry's extent.
|
int |
getLevel() |
int |
getMaxColorCode() |
int |
getMinColorCode() |
double |
getResolution() |
RectangularTessellator.RenderInfo |
getRi() |
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.
|
RectangularTessellator |
getTessellator() |
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)
Causes this
Renderable to render itself using the provided draw context. |
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 showTriangles,
boolean showTileBoundary)
Displays the geometry's tessellation.
|
protected final double cellSize
protected final int density
protected Extent extent
protected final int level
protected int maxColorCode
protected int minColorCode
protected RectangularTessellator.RenderInfo ri
protected final Sector sector
protected final RectangularTessellator tessellator
public RectTile(RectangularTessellator tessellator, Extent extent, int level, int density, Sector sector)
public void beginRendering(DrawContext dc, int numTextureUnits)
SectorGeometry
SectorGeometry.endRendering(gov.nasa.worldwind.render.DrawContext)
method must be called.beginRendering
in interface SectorGeometry
dc
- the current draw context.numTextureUnits
- the number of texture units to use.public void endRendering(DrawContext dc)
SectorGeometry
SectorGeometry.beginRendering(gov.nasa.worldwind.render.DrawContext, int)
.endRendering
in interface SectorGeometry
dc
- the current draw context.public double getCellSize()
public int getDensity()
public Extent getExtent()
SectorGeometry
getExtent
in interface SectorGeometry
public int getLevel()
public int getMaxColorCode()
public int getMinColorCode()
public double getResolution()
public RectangularTessellator.RenderInfo getRi()
public Sector getSector()
SectorGeometry
Sector
covered by this sector geometry.getSector
in interface SectorGeometry
public Vec4 getSurfacePoint(Angle latitude, Angle longitude, double metersOffset)
SectorGeometry
getSurfacePoint
in interface SectorGeometry
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.public RectangularTessellator getTessellator()
public Intersection[] intersect(double elevation)
SectorGeometry
intersect
in interface SectorGeometry
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.public Intersection[] intersect(Line line)
SectorGeometry
intersect
in interface SectorGeometry
line
- the line to intersect.public java.nio.DoubleBuffer makeTextureCoordinates(SectorGeometry.GeographicTextureCoordinateComputer computer)
SectorGeometry
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.makeTextureCoordinates
in interface SectorGeometry
computer
- the texture coordinate computer.public PickedObject[] pick(DrawContext dc, java.util.List<? extends java.awt.Point> pickPoints)
SectorGeometry
Note: This method assumes that SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method.
pick
in interface SectorGeometry
dc
- the current draw context.pickPoints
- a list of screen coordinate points to pick test.public void pick(DrawContext dc, java.awt.Point pickPoint)
SectorGeometry
DrawContext.getPickedObjects()
.
Note: This method assumes that SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method.
pick
in interface SectorGeometry
dc
- the current draw context.pickPoint
- a screen coordinate points to pick test.public void render(DrawContext dc)
Renderable
Renderable
to render itself using the provided draw context.render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void render(DrawContext dc, boolean beginRenderingCalled)
SectorGeometry
Note: This method allows but does not require that SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method. See the description of the beginRenderingCalled
argument.
render
in interface SectorGeometry
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 beginRendering
eliminates redundant rendering set-up and
is used when this sector geometry is rendered several times in succession.SectorGeometry.beginRendering(gov.nasa.worldwind.render.DrawContext, int)
public void renderBoundingVolume(DrawContext dc)
SectorGeometry
renderBoundingVolume
in interface SectorGeometry
dc
- the current draw context.public void renderMultiTexture(DrawContext dc, int numTextureUnits)
SectorGeometry
Note: This method assumes that SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method.
renderMultiTexture
in interface SectorGeometry
dc
- the current draw context.numTextureUnits
- the number of texture units to attempt to use.public void renderMultiTexture(DrawContext dc, int numTextureUnits, boolean beginRenderingCalled)
SectorGeometry
Note: This method allows but does not require that SectorGeometryList.beginRendering(gov.nasa.worldwind.render.DrawContext)
was called prior to this method. See the description of the beginRenderingCalled
argument.
renderMultiTexture
in interface SectorGeometry
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 <beginRendering>
eliminates redundant rendering set-up and
is used when this sector geometry is rendered several times in succession.SectorGeometry.beginRendering(gov.nasa.worldwind.render.DrawContext, int)
public void renderTileID(DrawContext dc)
SectorGeometry
renderTileID
in interface SectorGeometry
dc
- the current draw context.public void renderWireframe(DrawContext dc, boolean showTriangles, boolean showTileBoundary)
SectorGeometry
renderWireframe
in interface SectorGeometry
dc
- the current draw context.showTriangles
- if true, displays the interior triangles.showTileBoundary
- if true, displays the exterior boundary.