public class RenderContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Camera |
camera |
Vec3 |
cameraPoint |
Layer |
currentLayer |
DrawableQueue |
drawableQueue |
DrawableQueue |
drawableTerrain |
double |
fieldOfView |
Frustum |
frustum |
Globe |
globe |
double |
horizonDistance |
LayerList |
layers |
Matrix4 |
modelview |
Matrix4 |
modelviewProjection |
PickedObjectList |
pickedObjects |
boolean |
pickMode |
Vec2 |
pickPoint |
Line |
pickRay |
Viewport |
pickViewport |
Matrix4 |
projection |
RenderResourceCache |
renderResourceCache |
Resources |
resources |
Terrain |
terrain |
Tessellator |
terrainTessellator |
double |
verticalExaggeration |
Viewport |
viewport |
Constructor and Description |
---|
RenderContext() |
Modifier and Type | Method and Description |
---|---|
int |
drawableCount() |
Vec3 |
geographicToCartesian(double latitude,
double longitude,
double altitude,
int altitudeMode,
Vec3 result)
Converts a geographic position to Cartesian coordinates according to an
WorldWind.AltitudeMode . |
BufferObject |
getBufferObject(java.lang.Object key) |
<T extends Drawable> |
getDrawablePool(java.lang.Class<T> key) |
ShaderProgram |
getShaderProgram(java.lang.Object key) |
GLUtessellator |
getTessellator() |
Texture |
getText(java.lang.String text,
TextAttributes attributes) |
Texture |
getTexture(ImageSource imageSource) |
java.lang.Object |
getUserProperty(java.lang.Object key) |
boolean |
hasUserProperty(java.lang.Object key) |
boolean |
isRedrawRequested() |
int |
nextPickedObjectId() |
void |
offerDrawable(Drawable drawable,
int groupId,
double order) |
void |
offerDrawableTerrain(DrawableTerrain drawable,
double cameraDistance) |
void |
offerPickedObject(PickedObject pickedObject) |
void |
offerShapeDrawable(Drawable drawable,
double cameraDistance) |
void |
offerSurfaceDrawable(Drawable drawable,
double zOrder) |
double |
pixelSizeAtDistance(double distance)
Returns the height of a pixel at a given distance from the eye point.
|
boolean |
project(Vec3 modelPoint,
Vec3 result)
Projects a Cartesian point to screen coordinates.
|
boolean |
projectWithDepth(Vec3 modelPoint,
double depthOffset,
Vec3 result)
Projects a Cartesian point to screen coordinates, applying an offset to the point's projected depth value.
|
BufferObject |
putBufferObject(java.lang.Object key,
BufferObject buffer) |
ShaderProgram |
putShaderProgram(java.lang.Object key,
ShaderProgram program) |
Texture |
putTexture(ImageSource imageSource,
Texture texture) |
java.lang.Object |
putUserProperty(java.lang.Object key,
java.lang.Object value) |
java.lang.Object |
removeUserProperty(java.lang.Object key) |
Texture |
renderText(java.lang.String text,
TextAttributes attributes) |
void |
requestRedraw() |
void |
reset() |
Texture |
retrieveTexture(ImageSource imageSource,
ImageOptions imageOptions) |
void |
sortDrawables() |
public Globe globe
public Tessellator terrainTessellator
public Terrain terrain
public LayerList layers
public Layer currentLayer
public double verticalExaggeration
public double fieldOfView
public double horizonDistance
public Camera camera
public Vec3 cameraPoint
public Viewport viewport
public Matrix4 projection
public Matrix4 modelview
public Matrix4 modelviewProjection
public Frustum frustum
public RenderResourceCache renderResourceCache
public Resources resources
public DrawableQueue drawableQueue
public DrawableQueue drawableTerrain
public PickedObjectList pickedObjects
public Viewport pickViewport
public Vec2 pickPoint
public Line pickRay
public boolean pickMode
public void reset()
public boolean isRedrawRequested()
public void requestRedraw()
public double pixelSizeAtDistance(double distance)
distance
- the distance from the eye point in meterspublic boolean project(Vec3 modelPoint, Vec3 result)
modelPoint
- the Cartesian point to projectresult
- a pre-allocated Vec3
in which to return the projected pointjava.lang.IllegalArgumentException
- If any argument is nullpublic boolean projectWithDepth(Vec3 modelPoint, double depthOffset, Vec3 result)
modelPoint
- the Cartesian point to projectdepthOffset
- the amount of depth offset to applyresult
- a pre-allocated Vec3
in which to return the projected pointjava.lang.IllegalArgumentException
- If any argument is nullpublic Vec3 geographicToCartesian(double latitude, double longitude, double altitude, int altitudeMode, Vec3 result)
WorldWind.AltitudeMode
. The Cartesian coordinate system is a function of this render
context's current globe and its the terrain surface, depending on the altitude mode. In general, it is not safe
to cache the Cartesian coordinates, as many factors contribute to the value returned, and may change from one
frame to the next.latitude
- the position's latitude in degreeslongitude
- the position's longitude in degreesaltitude
- the position's altitude in metersaltitudeMode
- an altitude mode indicating how to interpret the position's altitude componentresult
- a pre-allocated Vec3
in which to store the computed X, Y and Z Cartesian coordinatesjava.lang.IllegalArgumentException
- if the result is nullpublic ShaderProgram getShaderProgram(java.lang.Object key)
public ShaderProgram putShaderProgram(java.lang.Object key, ShaderProgram program)
public Texture getTexture(ImageSource imageSource)
public Texture putTexture(ImageSource imageSource, Texture texture)
public Texture retrieveTexture(ImageSource imageSource, ImageOptions imageOptions)
public BufferObject getBufferObject(java.lang.Object key)
public BufferObject putBufferObject(java.lang.Object key, BufferObject buffer)
public Texture getText(java.lang.String text, TextAttributes attributes)
public Texture renderText(java.lang.String text, TextAttributes attributes)
public void offerDrawable(Drawable drawable, int groupId, double order)
public void offerSurfaceDrawable(Drawable drawable, double zOrder)
public void offerShapeDrawable(Drawable drawable, double cameraDistance)
public void offerDrawableTerrain(DrawableTerrain drawable, double cameraDistance)
public void sortDrawables()
public int drawableCount()
public void offerPickedObject(PickedObject pickedObject)
public int nextPickedObjectId()
public GLUtessellator getTessellator()
public java.lang.Object getUserProperty(java.lang.Object key)
public java.lang.Object putUserProperty(java.lang.Object key, java.lang.Object value)
public java.lang.Object removeUserProperty(java.lang.Object key)
public boolean hasUserProperty(java.lang.Object key)