Class GDXRenderer
java.lang.Object
nl.colorize.multimedialib.renderer.libgdx.GDXRenderer
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener,Renderer,SceneContext
public class GDXRenderer
extends Object
implements Renderer, SceneContext, com.badlogic.gdx.ApplicationListener
Renderer built on top of the libGDX framework. In turn, libGDX supports multiple
back-end implementations that determine which platforms are supported and which
libraries are used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancastPickRay(Point2D canvasPosition, Box area) Casts a pick ray from the specified 2D canvas position, and returns true if the pick ray intersects with the specified 3D world coordinates.voidcreate()createMesh(Shape3D shape, ColorRGB color) Programmatically creates a 3D polygon mesh with a solid color, based on the specified shape.voiddispose()getInput()Returns the display name for the underlying renderer.getStage()booleanisSupported(GraphicsMode graphicsMode) voidpause()Returns the 3D world coordinates that correspond to the specified 2D canvas coordinates, based on the current camera position.voidrender()voidresize(int width, int height) voidresume()voidstart(RenderConfig config, Scene initialScene) Starts this renderer based on the specified configuration.voidtakeScreenshot(File screenshotFile) Captures a screenshot of the renderer's current graphics and then exports the screenshot to a PNG file.voidTerminates the renderer, which will end the animation loop and quit the application.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.colorize.multimedialib.scene.SceneContext
attach, attach, attach, attachGlobal, changeScene, createMesh, getCanvas, getDebugInformation, getFrameStats
-
Constructor Details
-
GDXRenderer
public GDXRenderer()
-
-
Method Details
-
start
Description copied from interface:RendererStarts this renderer based on the specified configuration. The renderer will initially display the specified scene.This method can be called from any thread. The renderer will run in its own thread, which is started by calling this method. All callback methods will be called from the renderer thread.
-
create
public void create()- Specified by:
createin interfacecom.badlogic.gdx.ApplicationListener
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.ApplicationListener
-
resize
public void resize(int width, int height) - Specified by:
resizein interfacecom.badlogic.gdx.ApplicationListener
-
pause
public void pause()- Specified by:
pausein interfacecom.badlogic.gdx.ApplicationListener
-
resume
public void resume()- Specified by:
resumein interfacecom.badlogic.gdx.ApplicationListener
-
render
public void render()- Specified by:
renderin interfacecom.badlogic.gdx.ApplicationListener
-
terminate
public void terminate()Description copied from interface:SceneContextTerminates the renderer, which will end the animation loop and quit the application.- Specified by:
terminatein interfaceSceneContext
-
createMesh
Description copied from interface:SceneContextProgrammatically creates a 3D polygon mesh with a solid color, based on the specified shape.- Specified by:
createMeshin interfaceSceneContext
-
project
Description copied from interface:SceneContextReturns the 3D world coordinates that correspond to the specified 2D canvas coordinates, based on the current camera position.- Specified by:
projectin interfaceSceneContext
-
castPickRay
Description copied from interface:SceneContextCasts a pick ray from the specified 2D canvas position, and returns true if the pick ray intersects with the specified 3D world coordinates.- Specified by:
castPickRayin interfaceSceneContext
-
takeScreenshot
Description copied from interface:SceneContextCaptures a screenshot of the renderer's current graphics and then exports the screenshot to a PNG file.- Specified by:
takeScreenshotin interfaceSceneContext
-
isSupported
- Specified by:
isSupportedin interfaceRenderer
-
getRendererName
Description copied from interface:SceneContextReturns the display name for the underlying renderer. The display name will not include the word "renderer".- Specified by:
getRendererNamein interfaceSceneContext
-
getConfig
- Specified by:
getConfigin interfaceSceneContext
-
getInput
- Specified by:
getInputin interfaceSceneContext
-
getMediaLoader
- Specified by:
getMediaLoaderin interfaceSceneContext
-
getNetwork
- Specified by:
getNetworkin interfaceSceneContext
-
getSceneManager
- Specified by:
getSceneManagerin interfaceSceneContext
-
getStage
- Specified by:
getStagein interfaceSceneContext
-