Class AtmosphereComponent

java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.AtmosphereComponent
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IUpdatable<AtmosphereComponent>, IComponent

public class AtmosphereComponent extends NamedComponent implements IUpdatable<AtmosphereComponent>
  • 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
    • samples

      public int samples
    • 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, GraphNode graph, RotationComponent rigidRotation, ModelScaffolding scaffolding, 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.
      graph - The graph node component.
      rigidRotation - The rotation component.
      scaffolding - The model scaffolding component.
      vrOffset - The VR offset vector.
    • updateAtmosphericScatteringParams

      public void updateAtmosphericScatteringParams(Material mat, float alpha, boolean ground, Vector3b translation, RotationComponent rc, String inverseRefPlaneTransform, Vector3b parentTranslation, 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.
      translation - The translation vector.
      rc - The rotation component.
      parentTranslation - The parent translation vector.
      vrOffset - The VR offset vector.
    • 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)
    • setFogColor

      public void setFogColor(double[] fogColor)
    • setFogcolor

      public void setFogcolor(double[] fogColor)
    • setSamples

      public void setSamples(Long samples)
    • setNumSamples

      public void setNumSamples(Long samples)
    • setFogDensity

      public void setFogDensity(Double fogDensity)
    • 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()
    • setWavelengths

      public void setWavelengths(double[] wavelengths)
    • 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()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
    • updateWith

      public void updateWith(AtmosphereComponent object)
      Specified by:
      updateWith in interface IUpdatable<AtmosphereComponent>