Class SceneManager

java.lang.Object
gaiasky.util.gdx.model.gltf.scene3d.scene.SceneManager
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class SceneManager extends Object implements com.badlogic.gdx.utils.Disposable
  • Field Details

    • environment

      public Environment environment
      Shouldn't be null.
    • computedEnvironement

      protected final EnvironmentCache computedEnvironement
    • camera

      public com.badlogic.gdx.graphics.Camera camera
  • Constructor Details

  • Method Details

    • setEnvironmentRotation

      public void setEnvironmentRotation(float azymuthAngleDegree)
    • removeEnvironmentRotation

      public void removeEnvironmentRotation()
    • getBatch

      public IntModelBatch getBatch()
    • setBatch

      public void setBatch(IntModelBatch batch)
    • setDepthBatch

      public void setDepthBatch(IntModelBatch depthBatch)
    • getDepthBatch

      public IntModelBatch getDepthBatch()
    • setShaderProvider

      public void setShaderProvider(IntShaderProvider shaderProvider)
    • setDepthShaderProvider

      public void setDepthShaderProvider(DepthIntShaderProvider depthShaderProvider)
    • setTransmissionSource

      public void setTransmissionSource(TransmissionSource transmissionSource)
      Enable/disable opaque objects pre-rendering for transmission (refraction effect).
      Parameters:
      transmissionSource - set null to disable pre-rendering.
    • setMirrorSource

      public void setMirrorSource(MirrorSource mirrorSource)
      Enable/disable pre-rendering for mirror effect.
      Parameters:
      mirrorSource - set null to disable mirror.
    • setCascadeShadowMap

      public void setCascadeShadowMap(CascadeShadowMap cascadeShadowMap)
      Enable/disable pre-rendering for cascade shadow map.
      Parameters:
      cascadeShadowMap - set null to disable.
    • addScene

      public void addScene(Scene scene)
    • addScene

      public void addScene(Scene scene, boolean appendLights)
    • update

      public void update(float delta)
      should be called in order to perform light culling, skybox update and animations.
    • updateSkyboxRotation

      protected void updateSkyboxRotation()
      Automatically set skybox rotation matching this environment rotation. Subclasses could override this method in order to change this behavior.
    • updateEnvironment

      protected void updateEnvironment()
    • cullLights

      protected void cullLights()
    • render

      public void render()
      render all scenes. because shadows use frame buffers, if you need to render scenes to a frame buffer, you should instead first call renderShadows(), bind your frame buffer and then call renderColors()
    • renderMirror

      public void renderMirror()
    • renderTransmission

      public void renderTransmission()
    • renderShadows

      public void renderShadows()
      Render shadows only to internal frame buffers. (useful when you're using your own frame buffer to render scenes)
    • renderDepth

      public void renderDepth()
      Render only depth (packed 32 bits), useful for post processing effects. You typically render it to a FBO with depth enabled.
    • renderDepth

      public void renderDepth(com.badlogic.gdx.graphics.Camera camera)
      Render only depth (packed 32 bits) with custom camera. Useful to render shadow maps.
    • renderColors

      public void renderColors()
      Render colors only. You should call renderShadows() before. (useful when you're using your own frame buffer to render scenes)
    • getFirstDirectionalLight

      public com.badlogic.gdx.graphics.g3d.environment.DirectionalLight getFirstDirectionalLight()
    • getFirstDirectionalShadowLight

      public DirectionalShadowLight getFirstDirectionalShadowLight()
    • setSkyBox

      public void setSkyBox(SceneSkybox skyBox)
    • getSkyBox

      public SceneSkybox getSkyBox()
    • setAmbientLight

      public void setAmbientLight(float lum)
    • setCamera

      public void setCamera(com.badlogic.gdx.graphics.Camera camera)
    • removeScene

      public void removeScene(Scene scene)
    • getRenderableProviders

      public com.badlogic.gdx.utils.Array<IntRenderableProvider> getRenderableProviders()
    • updateViewport

      public void updateViewport(float width, float height)
    • getActiveLightsCount

      public int getActiveLightsCount()
    • getTotalLightsCount

      public int getTotalLightsCount()
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable