Class ScreenshotsManager
java.lang.Object
gaiasky.util.screenshot.ScreenshotsManager
- All Implemented Interfaces:
IObserver
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionScreenshotsManager(GaiaSky gaiaSky, SceneRenderer sceneRenderer, GlobalResources globalResources) -
Method Summary
Modifier and TypeMethodDescriptionvoidEvent notification call.voidrenderCurrentFrameBuffer(String folder, String file, int w, int h) voidrenderToImage(SceneRenderer sceneRenderer, ICamera camera, double dt, IPostProcessor.PostProcessBean ppb, int width, int height, String folder, String filename, IFileImageRenderer imageRenderer, Settings.ImageFormat format, float quality) Renders the current scene to an image and returns the file name where it has been written tovoidtakeScreenshot(int width, int height, String directory) Posts a runnable that renders a screenshot after the current update-render cycle.
-
Field Details
-
frameRenderer
-
screenshotRenderer
-
-
Constructor Details
-
ScreenshotsManager
public ScreenshotsManager(GaiaSky gaiaSky, SceneRenderer sceneRenderer, GlobalResources globalResources)
-
-
Method Details
-
renderFrame
public void renderFrame() -
renderCurrentFrameBuffer
-
takeScreenshot
Posts a runnable that renders a screenshot after the current update-render cycle.- Parameters:
width- The width of the screenshot.height- The height of the screenshot.directory- The directory to save the screenshot.
-
renderToImage
public String renderToImage(SceneRenderer sceneRenderer, ICamera camera, double dt, IPostProcessor.PostProcessBean ppb, int width, int height, String folder, String filename, IFileImageRenderer imageRenderer, Settings.ImageFormat format, float quality) Renders the current scene to an image and returns the file name where it has been written to- Parameters:
sceneRenderer- The main renderer to use.camera- The camera.width- The width of the image.height- The height of the image.folder- The folder to save the image to.filename- The file name prefix.imageRenderer- theIFileImageRendererto use.- Returns:
- String with the path to the screenshot image file.
-
notify
-