From 0aa50a0f15f2223a2803d2a3ab905d21502f8f9c Mon Sep 17 00:00:00 2001 From: Daniel Perano Date: Mon, 16 Mar 2020 00:28:44 -0700 Subject: [PATCH] Expose ViewPorts This commit allows EnvironmentCamera users to access the ViewPorts used for rendering the snapshots. This allows incorporating screenspace and other SceneProcessor-based effects into the snapshots as well as the scene geometry. --- .../java/com/jme3/environment/EnvironmentCamera.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java b/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java index 025d9a7b4..6f2f82143 100644 --- a/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java +++ b/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java @@ -249,6 +249,15 @@ public class EnvironmentCamera extends BaseAppState { } } + /** + * Returns an array of the 6 ViewPorts used to capture the snapshot. + * Note that this will be null until after initialize() is called. + * @return array of ViewPorts + */ + public ViewPort[] getViewPorts(){ + return viewports; + } + @Override protected void initialize(Application app) { this.backGroundColor = app.getViewPort().getBackgroundColor();