⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawcontext.java

📁 world wind java sdk 源码
💻 JAVA
字号:
/*Copyright (C) 2001, 2006 United States Governmentas represented by the Administrator of theNational Aeronautics and Space Administration.All Rights Reserved.*/package gov.nasa.worldwind.render;import com.sun.opengl.util.texture.TextureCoords;import gov.nasa.worldwind.Disposable;import gov.nasa.worldwind.Model;import gov.nasa.worldwind.View;import gov.nasa.worldwind.WWObject;import gov.nasa.worldwind.cache.TextureCache;import gov.nasa.worldwind.geom.Angle;import gov.nasa.worldwind.geom.Position;import gov.nasa.worldwind.geom.Sector;import gov.nasa.worldwind.geom.Vec4;import gov.nasa.worldwind.globes.Globe;import gov.nasa.worldwind.layers.Layer;import gov.nasa.worldwind.layers.LayerList;import gov.nasa.worldwind.pick.PickedObject;import gov.nasa.worldwind.pick.PickedObjectList;import gov.nasa.worldwind.terrain.SectorGeometryList;import gov.nasa.worldwind.util.PerformanceStatistic;import javax.media.opengl.GL;import javax.media.opengl.GLContext;import javax.media.opengl.GLDrawable;import javax.media.opengl.glu.GLU;import java.awt.*;import java.util.Collection;import java.util.List;import java.util.Set;/** * @author Tom Gaskins * @version $Id: DrawContext.java 9365 2009-03-13 22:41:43Z dcollins $ */public interface DrawContext extends WWObject, Disposable{    /**     * Assigns this <code>DrawContext</code> a new </code>javax.media.opengl.GLContext</code>. May throw a     * <code>NullPointerException</code> if <code>glContext</code> is null.     *     * @param glContext the new <code>javax.media.opengl.GLContext</code>     *     * @throws NullPointerException if glContext is null     * @since 1.5     */    void setGLContext(GLContext glContext);    /**     * Retrieves this <code>DrawContext</code>s </code>javax.media.opengl.GLContext</code>. If this method returns null,     * then there are potentially no active <code>GLContext</code>s and rendering should be aborted.     *     * @return this <code>DrawContext</code>s </code>javax.media.opengl.GLContext</code>.     *     * @since 1.5     */    GLContext getGLContext();    /**     * Retrieves the current <code>javax.media.opengl.GL</code>. A <code>GL</code> or <code>GLU</code> is required for     * all graphical rendering in World Wind Raptor.     *     * @return the current <code>GL</code> if available, null otherwise     *     * @since 1.5     */    GL getGL();    /**     * Retrieves the current <code>javax.media.opengl.glu.GLU</code>. A <code>GLU</code> or <code>GL</code> is required     * for all graphical rendering in World Wind Raptor.     *     * @return the current <code>GLU</code> if available, null otherwise     *     * @since 1.5     */    GLU getGLU();    /**     * Retrieves the current<code>javax.media.opengl.GLDrawable</code>. A <code>GLDrawable</code> can be used to create     * a <code>GLContext</code>, which can then be used for rendering.     *     * @return the current <code>GLDrawable</code>, null if none available     *     * @since 1.5     */    GLDrawable getGLDrawable();    /**     * Retrieves the drawable width of this <code>DrawContext</code>.     *     * @return the drawable width of this <code>DrawCOntext</code>     *     * @since 1.5     */    int getDrawableWidth();    /**     * Retrieves the drawable height of this <code>DrawContext</code>.     *     * @return the drawable height of this <code>DrawCOntext</code>     *     * @since 1.5     */    int getDrawableHeight();    /**     * Initializes this <code>DrawContext</code>. This method should be called at the beginning of each frame to prepare     * the <code>DrawContext</code> for the coming render pass.     *     * @param glContext the <code>javax.media.opengl.GLContext</code> to use for this render pass     *     * @since 1.5     */    void initialize(GLContext glContext);    /**     * Assigns a new <code>View</code>. Some layers cannot function properly with a null <code>View</code>. It is     * recommended that the <code>View</code> is never set to null during a normal render pass.     *     * @param view the enw <code>View</code>     *     * @since 1.5     */    void setView(View view);    /**     * Retrieves the current <code>View</code>, which may be null.     *     * @return the current <code>View</code>, which may be null     *     * @since 1.5     */    View getView();    /**     * Assign a new <code>Model</code>. Some layers cannot function properly with a null <code>Model</code>. It is     * recommended that the <code>Model</code> is never set to null during a normal render pass.     *     * @param model the new <code>Model</code>     *     * @since 1.5     */    void setModel(Model model);    /**     * Retrieves the current <code>Model</code>, which may be null.     *     * @return the current <code>Model</code>, which may be null     *     * @since 1.5     */    Model getModel();    /**     * Retrieves the current <code>Globe</code>, which may be null.     *     * @return the current <code>Globe</code>, which may be null     *     * @since 1.5     */    Globe getGlobe();    /**     * Retrieves a list containing all the current layers. No guarantee is made about the order of the layers.     *     * @return a <code>LayerList</code> containing all the current layers     *     * @since 1.5     */    LayerList getLayers();    /**     * Retrieves a <code>Sector</code> which is at least as large as the current visible sector. The value returned is     * the value passed to <code>SetVisibleSector</code>. This method may return null.     *     * @return a <code>Sector</code> at least the size of the curernt visible sector, null if unavailable     *     * @since 1.5     */    Sector getVisibleSector();    /**     * Sets the visible <code>Sector</code>. The new visible sector must completely encompass the Sector which is     * visible on the display.     *     * @param s the new visible <code>Sector</code>     *     * @since 1.5     */    void setVisibleSector(Sector s);    /**     * Sets the vertical exaggeration. Vertical exaggeration affects the appearance of areas with varied elevation. A     * vertical exaggeration of zero creates a surface which exactly fits the shape of the underlying     * <code>Globe</code>. A vertical exaggeration of 3 will create mountains and valleys which are three times as     * high/deep as they really are.     *     * @param verticalExaggeration the new vertical exaggeration.     *     * @since 1.5     */    void setVerticalExaggeration(double verticalExaggeration);    /**     * Retrieves the current vertical exaggeration. Vertical exaggeration affects the appearance of areas with varied     * elevation. A vertical exaggeration of zero creates a surface which exactly fits the shape of the underlying     * <code>Globe</code>. A vertical exaggeration of 3 will create mountains and valleys which are three times as     * high/deep as they really are.     *     * @return the current vertical exaggeration     *     * @since 1.5     */    double getVerticalExaggeration();    /**     * Retrieves a list of all the sectors rendered so far this frame.     *     * @return a <code>SectorGeometryList</code> containing every <code>SectorGeometry</code> rendered so far this     *         render pass.     *     * @since 1.5     */    SectorGeometryList getSurfaceGeometry();    /**     * Returns the list of objects picked during the most recent pick traversal.     *     * @return the list of picked objects     */    PickedObjectList getPickedObjects();    /**     * Adds a collection of picked objects to the current picked-object list     *     * @param pickedObjects the objects to add     */    void addPickedObjects(PickedObjectList pickedObjects);    /**     * Adds a single insatnce of the picked object to the current picked-object list     *     * @param pickedObject the object to add     */    void addPickedObject(PickedObject pickedObject);    /**     * Returns a unique color to serve as a pick identifier during picking.     *     * @return a unique pick color     */    java.awt.Color getUniquePickColor();    java.awt.Color getClearColor();    /** Enables color picking mode */    void enablePickingMode();    /**     * Returns true if the Picking mode is active, otherwise return false     *     * @return true for Picking mode, otherwise false     */    boolean isPickingMode();    /** Disables color picking mode */    void disablePickingMode();    void addOrderedRenderable(OrderedRenderable orderedRenderable);    java.util.Queue<OrderedRenderable> getOrderedRenderables();    void drawUnitQuad();    void drawUnitQuad(TextureCoords texCoords);    int getNumTextureUnits();    void setNumTextureUnits(int numTextureUnits);    double getMaxTextureAnisotropy();    void setMaxTextureAnisotropy(double maxAnisotropy);    void setSurfaceGeometry(SectorGeometryList surfaceGeometry);    Vec4 getPointOnGlobe(Angle latitude, Angle longitude);    Vec4 getScreenPoint(Angle latitude, Angle longitude, double metersElevation);    Vec4 getScreenPoint(Position position);    Vec4 getScreenPoint(Vec4 modelPoint);    SurfaceTileRenderer getGeographicSurfaceTileRenderer();    Point getPickPoint();    void setPickPoint(Point pickPoint);    TextureCache getTextureCache();    void setTextureCache(TextureCache textureCache);    Collection<PerformanceStatistic> getPerFrameStatistics();    void setPerFrameStatisticsKeys(Set<String> statKeys, Collection<PerformanceStatistic> stats);    void setPerFrameStatistic(String key, String displayName, Object statistic);    void setPerFrameStatistics(Collection<PerformanceStatistic> stats);    Set<String> getPerFrameStatisticsKeys();    Point getViewportCenterScreenPoint();    void setViewportCenterScreenPoint(Point viewportCenterPoint);    Position getViewportCenterPosition();    void setViewportCenterPosition(Position viewportCenterPosition);    TextRendererCache getTextRendererCache();    void setTextRendererCache(TextRendererCache textRendererCache);    Vec4 getViewportCenterSurfacePoint();    Vec4 getViewportCenterGlobePoint();    AnnotationRenderer getAnnotationRenderer();    void setAnnotationRenderer(AnnotationRenderer annotationRenderer);    long getFrameTimeStamp();    void setFrameTimeStamp(long frameTimeStamp);    /**     * Returns the visible sectors at one of several specified resolutions within a specfied search sector. Several     * sectors resolutions may be specified along with a time limit. The best resolution that can be determined within     * the time limit is returned.     * <p/>     * Adherence to the time limit is not precise. The limit is checked only between full searches at each resolution.     * The search may take more than the specified time, but will terminate if no time is left before starting a     * higher-resolution search.     *     * @param resolutions  the resolutions of the sectors to return, in latitude.     * @param timeLimit    the amount of time, in milliseconds, to allow for searching.     * @param searchSector the sector to decompose into visible sectors.     *     * @return the visible sectors at the best resolution achievable given the time limit. The actual resolution can be     *         determined by examining the delta-latitude value of any of the returnced sectors.     *     * @throws IllegalArgumentException if the resolutions array or the search sector is null.     */    List<Sector> getVisibleSectors(double[] resolutions, long timeLimit, Sector searchSector);    /**     * Sets the current-layer field to the specified layer or null. The field is informative only and enables layer     * contents to determine their containing layer.     *     * @param layer the current layer or null.     */    void setCurrentLayer(Layer layer);    /**     * Returns the current-layer. The field is informative only and enables layer contents to determine their containing     * layer.     *     * @return the current layer, or null if no layer is current.     */    Layer getCurrentLayer();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -