Class AtmosphereComponent

java.lang.Object
gaiasky.scenegraph.component.NamedComponent
gaiasky.scenegraph.component.AtmosphereComponent
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IComponent

public class AtmosphereComponent extends NamedComponent
  • Field Details

    • quality

      public int quality
    • size

      public float size
    • planetSize

      public float planetSize
    • mc

      public ModelComponent mc
    • localTransform

      public com.badlogic.gdx.math.Matrix4 localTransform
    • wavelengths

      public double[] wavelengths
    • m_fInnerRadius

      public float m_fInnerRadius
    • m_fOuterRadius

      public float m_fOuterRadius
    • m_fAtmosphereHeight

      public float m_fAtmosphereHeight
    • m_Kr

      public float m_Kr
    • m_Km

      public float m_Km
    • fogDensity

      public float fogDensity
    • fogColor

      public com.badlogic.gdx.math.Vector3 fogColor
    • m_eSun

      public float m_eSun
    • params

      public Map<String,Object> params
  • Constructor Details

    • AtmosphereComponent

      public AtmosphereComponent()
  • Method Details

    • doneLoading

      public void doneLoading(Material planetMat, float planetSize)
    • update

      public void update(Vector3b transform)
    • setUpAtmosphericScatteringMaterial

      public void setUpAtmosphericScatteringMaterial(Material mat)
      Sets up the atmospheric scattering parameters to the given material
      Parameters:
      mat - The material to set up.
    • removeAtmosphericScattering

      public void removeAtmosphericScattering(Material mat)
    • updateAtmosphericScatteringParams

      public void updateAtmosphericScatteringParams(Material mat, float alpha, boolean ground, Planet planet, Vector3d vrOffset)
      Updates the atmospheric scattering shader parameters
      Parameters:
      mat - The material to update.
      alpha - The opacity value.
      ground - Whether it is the ground shader or the atmosphere.
      planet - The planet itself, holder of this atmosphere
    • setQuality

      public void setQuality(Long quality)
    • setSize

      public void setSize(Double size)
    • setMc

      public void setMc(ModelComponent mc)
    • setLocalTransform

      public void setLocalTransform(com.badlogic.gdx.math.Matrix4 localTransform)
    • setWavelengths

      public void setWavelengths(double[] wavelengths)
    • setFogcolor

      public void setFogcolor(double[] fogColor)
    • setFogdensity

      public void setFogdensity(Double fogDensity)
    • setM_Kr

      public void setM_Kr(Double m_Kr)
    • setM_Km

      public void setM_Km(Double m_Km)
    • setM_eSun

      public void setM_eSun(Double m_eSun)
    • getWavelengths

      public double[] getWavelengths()
    • setParams

      public void setParams(Map<String,Object> params)
    • randomizeAll

      public void randomizeAll(long seed, double size)
      Creates a random atmosphere component using the given seed and the base body size.
      Parameters:
      seed - The seed to use.
      size - The body size in internal units.
    • copyFrom

      public void copyFrom(AtmosphereComponent other)
    • print

      public void print(Logger.Log log)
    • dispose

      public void dispose()