|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SurfaceObject
Common interface for renderables that are drawn on the Globe's surface terrain, such as SurfaceShape. SurfaceObject implements the Renderable
and PreRenderable interfaces, so a surface object may be aggregated within any
layer or within some arbitrary rendering code.
DrawContext.addOrderedSurfaceRenderable(OrderedRenderable) during the preRender,
pick, and render stages. This enables SurfaceObjects to be processed in bulk, and reduces texture memory consumption
by sharing rendering resources amongst multiple SurfaceObjects.
Implementations of SurfaceObject require that preRender(DrawContext) is called before render(DrawContext) and pick(DrawContext, java.awt.Point), and that preRender is called at the appropriate
stage in the current rendering cycle. Calling preRender locks in the SurfaceObject's visual appearance for any
subsequent calls to pick or render until the next call preRender.
| Method Summary | |
|---|---|
Object |
getDelegateOwner()
Returns the delegate owner of the surface object. |
double |
getDistanceFromEye()
Returns zero to indicate that the surface object's distance from the eye is unknown. |
Extent |
getExtent(DrawContext dc)
Returns the surface object's enclosing volume as an Extent in model coordinates,
given a specified DrawContext. |
List<Sector> |
getSectors(DrawContext dc)
Returns a List of Sector instances that bound the surface
object on the specified DrawContext. |
Object |
getStateKey(DrawContext dc)
Returns an object that uniquely identifies the surface object's state on the specified draw context. |
boolean |
isVisible()
Indicates whether the surface object should be drawn during rendering. |
void |
pick(DrawContext dc,
Point pickPoint)
Causes the surface object to draw a pickable representation of itself on the surface terrain, using the provided draw context. |
void |
preRender(DrawContext dc)
Causes the surface object to prepare a representation of itself which can be drawn on the surface terrain, using the provided draw context. |
void |
render(DrawContext dc)
Causes the surface object to render a representation of itself on the surface terrain, using the provided draw context. |
void |
setDelegateOwner(Object owner)
Specifies the delegate owner of the surface object. |
void |
setVisible(boolean visible)
Specifies whether the surface object should be drawn during rendering. |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Method Detail |
|---|
Object getDelegateOwner()
double getDistanceFromEye()
getDistanceFromEye in interface OrderedRenderableExtent getExtent(DrawContext dc)
Extent in model coordinates,
given a specified DrawContext.
dc - the current draw context.
IllegalArgumentException - if the draw context is null.List<Sector> getSectors(DrawContext dc)
List of Sector instances that bound the surface
object on the specified DrawContext.
dc - the DrawContext the surface object is related to.
Object getStateKey(DrawContext dc)
dc - the draw context the state key relates to.
boolean isVisible()
void pick(DrawContext dc,
Point pickPoint)
pick in interface OrderedRenderabledc - the current draw context.pickPoint - the pick point.
IllegalArgumentException - if the draw context is null.void preRender(DrawContext dc)
preRender in interface PreRenderabledc - the current draw context.void render(DrawContext dc)
render in interface Renderabledc - the current draw context.
IllegalArgumentException - if the draw context is null.DrawContextvoid setDelegateOwner(Object owner)
owner - the object to use as the pickable object returned during picking, or null to return the surface
object.void setVisible(boolean visible)
visible - true if the object is to be drawn, otherwise false.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||