public class FramebufferTexture extends Object implements WWTexture
Modifier and Type | Field and Description |
---|---|
protected List<LatLon> |
corners |
protected static int |
DEFAULT_TESSELLATION_DENSITY
The default density of texture coordinates to specify for the quadrilateral the texture's applied to.
|
protected int |
height |
protected Sector |
sector |
protected WWTexture |
sourceTexture |
protected int |
tessellationDensity
The density of explicit texture coordinates to specify for the quadrilateral the texture's applied to.
|
protected TextureCoords |
textureCoords |
protected int |
width |
Constructor and Description |
---|
FramebufferTexture(WWTexture imageSource,
Sector sector,
List<LatLon> corners) |
Modifier and Type | Method and Description |
---|---|
void |
applyInternalTransform(DrawContext dc)
Applies any necessary transformations to the texture prior to its being rendered.
|
boolean |
bind(DrawContext dc)
Makes this texture the current texture for rendering.
|
protected Matrix |
computeGeographicToCartesianTransform(Sector sector) |
protected void |
drawQuad(DrawContext dc,
BilinearInterpolator interp,
int slices,
int stacks) |
protected void |
drawQuad(DrawContext dc,
Matrix geoToCartesian,
int slices,
int stacks) |
protected boolean |
generateTexture(DrawContext dc,
int width,
int height) |
List<LatLon> |
getCorners() |
int |
getHeight(DrawContext dc)
Returns the texture's height
|
Object |
getImageSource()
Returns the texture's image source.
|
Sector |
getSector() |
protected int |
getTessellationDensity() |
TextureCoords |
getTexCoords()
Returns the texture's texture coordinates, which may be other than [0,0],[1,1] if the texture size is not a power
of two or the texture must be flipped when rendered.
|
int |
getWidth(DrawContext dc)
Returns the texture's width.
|
protected Texture |
initializeTexture(DrawContext dc) |
boolean |
isTextureCurrent(DrawContext dc)
Indicates whether the texture is currently available for use without regenerating it from its image source.
|
boolean |
isTextureInitializationFailed()
Indicates whether an attempt to initialize the texture failed, which occurs when the image source is a
non-existent image file or for other reasons specific to the image source.
|
protected Vec4 |
transformToQuadCoordinates(Matrix geoToCartesian,
LatLon latLon) |
protected static final int DEFAULT_TESSELLATION_DENSITY
protected int height
protected Sector sector
protected WWTexture sourceTexture
protected int tessellationDensity
protected TextureCoords textureCoords
protected int width
public void applyInternalTransform(DrawContext dc)
WWTexture
applyInternalTransform
in interface WWTexture
dc
- the current draw context.public boolean bind(DrawContext dc)
WWTexture
protected Matrix computeGeographicToCartesianTransform(Sector sector)
protected void drawQuad(DrawContext dc, BilinearInterpolator interp, int slices, int stacks)
protected void drawQuad(DrawContext dc, Matrix geoToCartesian, int slices, int stacks)
protected boolean generateTexture(DrawContext dc, int width, int height)
public int getHeight(DrawContext dc)
WWTexture
public Object getImageSource()
WWTexture
getImageSource
in interface WWTexture
public Sector getSector()
protected int getTessellationDensity()
public TextureCoords getTexCoords()
WWTexture
getTexCoords
in interface WWTexture
public int getWidth(DrawContext dc)
WWTexture
protected Texture initializeTexture(DrawContext dc)
public boolean isTextureCurrent(DrawContext dc)
WWTexture
isTextureCurrent
in interface WWTexture
dc
- the current draw contextpublic boolean isTextureInitializationFailed()
WWTexture
isTextureInitializationFailed
in interface WWTexture