|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.system.DisplaySystem
com.jme.scene.model.XMLparser.Converters.DummyDisplaySystem
Started Date: Jul 2, 2004
This class is a dummy class that is not suppost to be rendered. It is here to
allow the easy creation of dummy jME objects (like various RenderState and
Spatial) so that they can be used by conversion utilities to read/write jME.
It is NOT to be used for rendering as it won't do anything at all.
| Field Summary |
| Fields inherited from class com.jme.system.DisplaySystem |
alphaBits, bpp, created, depthBits, frq, fs, height, rendererNames, samples, stencilBits, width |
| Constructor Summary | |
DummyDisplaySystem()
|
|
| Method Summary | |
void |
close()
close shutdowns and destroys any window contexts. |
java.awt.Canvas |
createCanvas(int w,
int h)
createCanvas creates an awt canvas with the
desired settings. |
void |
createHeadlessWindow(int w,
int h,
int bpp)
createHeadlessWindow creates a headless window with the
desired settings. |
TextureRenderer |
createTextureRenderer(int width,
int height,
boolean useRGB,
boolean useRGBA,
boolean useDepth,
boolean isRectangle,
int target,
int mipmaps)
Crate a TextureRenderer using the underlying system. |
void |
createWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
createWindow creates a window with the desired settings. |
WidgetFont |
getFont(java.lang.String fontName)
|
Renderer |
getRenderer()
getRenderer returns the Renderer
implementation that is compatible with the chosen
DisplaySystem. |
RendererType |
getRendererType()
getRendererType returns an instance of a strongly typed
enumeration that can be used to determine the renderer that the
DisplaySystem is currently using. |
Vector3f |
getScreenCoordinates(Vector3f worldPosition)
Translate world to screen coordinates |
Vector3f |
getScreenCoordinates(Vector3f worldPosition,
Vector3f store)
Translate world to screen coordinates |
Vector3f |
getWorldCoordinates(Vector2f screenPosition,
float zPos)
Translate screen to world coordinates. |
Vector3f |
getWorldCoordinates(Vector2f screenPosition,
float zPos,
Vector3f store)
Translate screen to world coordinates. |
boolean |
isClosing()
isClosing notifies if the window is currently closing. |
boolean |
isValidDisplayMode(int width,
int height,
int bpp,
int freq)
isValidDisplayMode determines if the given parameters
constitute a valid display mode on this system. |
void |
recreateWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
recreateWindow recreates a window with the desired
settings. |
void |
reset()
reset cleans up the display system for closing or
restarting. |
void |
setRenderer(Renderer r)
|
void |
setTitle(java.lang.String title)
Sets the title of the display system. |
void |
setVSyncEnabled(boolean enabled)
setVSyncEnabled attempts to enable or disable monitor
vertical synchronization. |
| Methods inherited from class com.jme.system.DisplaySystem |
getBitDepth, getDisplaySystem, getDisplaySystem, getFrequency, getHeight, getMinAlphaBits, getMinDepthBits, getMinSamples, getMinStencilBits, getWidth, isCreated, isFullScreen, setMinAlphaBits, setMinDepthBits, setMinSamples, setMinStencilBits, updateStates |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DummyDisplaySystem()
| Method Detail |
public boolean isValidDisplayMode(int width,
int height,
int bpp,
int freq)
DisplaySystemisValidDisplayMode determines if the given parameters
constitute a valid display mode on this system. Returning true does not
necessarily guarantee that the system is capable of running in the
specified display mode, merely that it believes it is possible.
isValidDisplayMode in class DisplaySystemwidth - the width/horizontal resolution of the display.height - the height/vertical resolution of the display.bpp - the bit depth of the display.freq - the frequency of refresh of the display (in Hz).public void setVSyncEnabled(boolean enabled)
DisplaySystemsetVSyncEnabled attempts to enable or disable monitor
vertical synchronization. The method is a "best attempt" to change the
monitor vertical refresh synchronization, and is not guaranteed
to be successful.
setVSyncEnabled in class DisplaySystemenabled - true to synchronize, false to
ignore synchronizationpublic void setTitle(java.lang.String title)
DisplaySystem
setTitle in class DisplaySystemtitle - The new display title.
public void createWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
DisplaySystemcreateWindow creates a window with the desired settings.
The width and height defined by w and h define the size of the window if
fullscreen is false, otherwise it defines the resolution of the
fullscreen display. The color depth is defined by bpp. The implementing
class should only allow 16, 24, and 32. The monitor frequency is defined
by the frq parameter and should not exceed the capabilities of the
connected hardware, the implementing class should attempt to assure this
does not happen. Lastly, the boolean flag fs determines if the display
should be windowed or fullscreen. If false, windowed is chosen. This
window will be placed in the center of the screen initially. If true
fullscreen mode will be entered with the appropriate settings.
createWindow in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.bpp - the color depth of the display.frq - the frequency of refresh of the display.fs - flag determining if fullscreen is to be used or not. True will
use fullscreen, false will use windowed mode.
public void createHeadlessWindow(int w,
int h,
int bpp)
DisplaySystemcreateHeadlessWindow creates a headless window with the
desired settings. A headless window is a rendering target that is not
shown on screen. It is useful for doing offline rendering, integration
and so forth. You can not have a regular and headless
window at the same time. The width and height defined by w and h define
the size of the window. The color depth is defined by bpp.
createHeadlessWindow in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.bpp - the color depth of the display.
public void recreateWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
DisplaySystemrecreateWindow recreates a window with the desired
settings.
recreateWindow in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.bpp - the color depth of the display.frq - the frequency of refresh of the display.fs - flag determining if fullscreen is to be used or not. True will
use fullscreen, false will use windowed mode.public Renderer getRenderer()
DisplaySystemgetRenderer returns the Renderer
implementation that is compatible with the chosen
DisplaySystem. For example, if
LWJGLDisplaySystem is used, the returned
Renderer will be LWJGLRenderer.
getRenderer in class DisplaySystemRenderer implementation that is
compatible with the used DisplaySystem.Rendererpublic RendererType getRendererType()
DisplaySystemgetRendererType returns an instance of a strongly typed
enumeration that can be used to determine the renderer that the
DisplaySystem is currently using.
getRendererType in class DisplaySystemJmeTypepublic boolean isClosing()
DisplaySystemisClosing notifies if the window is currently closing.
This could be caused via the application itself or external interrupts
such as alt-f4 etc.
isClosing in class DisplaySystempublic void reset()
DisplaySystemreset cleans up the display system for closing or
restarting.
reset in class DisplaySystempublic void close()
DisplaySystemclose shutdowns and destroys any window contexts.
close in class DisplaySystempublic WidgetFont getFont(java.lang.String fontName)
getFont in class DisplaySystemfontName - -
name of the font to loaded
public TextureRenderer createTextureRenderer(int width,
int height,
boolean useRGB,
boolean useRGBA,
boolean useDepth,
boolean isRectangle,
int target,
int mipmaps)
DisplaySystem
createTextureRenderer in class DisplaySystemwidth - width of textureheight - height of textureuseRGB - if this is true, useRGBA should not beuseRGBA - if this is true, useRGB should not beuseDepth - isRectangle - target - mipmaps -
public Vector3f getScreenCoordinates(Vector3f worldPosition)
DisplaySystem
getScreenCoordinates in class DisplaySystemworldPosition - Vector3f representing the world position to retrieve.
public Vector3f getScreenCoordinates(Vector3f worldPosition,
Vector3f store)
DisplaySystem
getScreenCoordinates in class DisplaySystemworldPosition - Vector3f representing the world position to retrieve.store - Vector3f to store the world position in.
public Vector3f getWorldCoordinates(Vector2f screenPosition,
float zPos)
DisplaySystem
getWorldCoordinates in class DisplaySystemscreenPosition - Vector2f representing the screen position with 0,0 at the
bottom left.zPos - float The z position away from the viewing plane.
public Vector3f getWorldCoordinates(Vector2f screenPosition,
float zPos,
Vector3f store)
DisplaySystem
getWorldCoordinates in class DisplaySystemscreenPosition - Vector2f representing the screen position with 0,0 at the
bottom leftzPos - float The z position away from the viewing plane.store - Vector3f The vector to store the result in.
public void setRenderer(Renderer r)
setRenderer in class DisplaySystem
public java.awt.Canvas createCanvas(int w,
int h)
DisplaySystemcreateCanvas creates an awt canvas with the
desired settings. The width and height defined by w and h define
the size of the canvas.
createCanvas in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||