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 final class AtmosphereComponent
extends NamedComponent
implements IUpdatable<AtmosphereComponent>
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.badlogic.gdx.math.Vector3floatcom.badlogic.gdx.math.Matrix4floatfloatfloatfloatfloatfloatfloatMie phase function asymmetry factor g (range: [-1, 1]; positive = forward scattering).floatOzone vertical optical depth at red (Chappuis band, ~600 nm peak).floatintintfloatNormalized atmospheric scale depth (fraction of inner radius).floatdouble[]Fields inherited from class NamedComponent
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(AtmosphereComponent other) voiddispose()voiddoneLoading(Material planetMat, float planetSize) double[]voidprint(Logger.Log log) voidrandomizeAll(long seed, double bodyRadius) Creates a random atmosphere component using the given seed and the base body size.voidvoidsetFogcolor(double[] fogColor) voidsetFogColor(double[] fogColor) voidsetFogdensity(Double fogDensity) voidsetFogDensity(Double fogDensity) voidsetLocalTransform(com.badlogic.gdx.math.Matrix4 localTransform) voidvoidvoidvoidsetMc(ModelComponent mc) voidsetMieasymmetryg(Double mieAsymmetryG) voidsetMieAsymmetryG(Double mieAsymmetryG) voidsetNumSamples(Long samples) voidsetO3OpticalDepth(Double o3OpticalDepth) Sets the ozone vertical optical depth at red (Chappuis band, ~600 nm peak).voidsetO3strength(Double o3Strength) Deprecated.voidvoidsetQuality(Long quality) voidsetSamples(Long samples) voidsetScaledepth(Double scaleDepth) voidsetScaleDepth(Double scaleDepth) voidvoidSets up the atmospheric scattering parameters to the given materialvoidsetWavelengths(double[] wavelengths) voidvoidupdateAtmosphericScatteringParams(Material mat, float alpha, boolean ground, GraphNode graph, RotationComponent rigidRotation, ModelScaffolding scaffolding, Vector3D vrOffset) Updates the atmospheric scattering shader parameters.voidupdateAtmosphericScatteringParams(Material mat, float alpha, boolean ground, Vector3Q translation, RotationComponent rc, String inverseRefPlaneTransform, Vector3Q parentTranslation, Vector3D vrOffset) Updates the atmospheric scattering shader parameters.voidupdateWith(AtmosphereComponent object) Methods inherited from class NamedComponent
createIcoSphereParameters, createUVSphereParameters, gaussian, gaussian, gaussian, initializeModifier and TypeMethodDescriptioncreateIcoSphereParameters(long recursion, double diameter, boolean flip) createUVSphereParameters(long quality, double diameter, boolean flip) protected doubleprotected doubleprotected doublevoidinitialize(String name)
-
Field Details
-
quality
public int quality -
size
public float size -
planetSize
public float planetSize -
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 -
o3OpticalDepth
public float o3OpticalDepthOzone vertical optical depth at red (Chappuis band, ~600 nm peak). -
mieAsymmetryG
public float mieAsymmetryGMie phase function asymmetry factor g (range: [-1, 1]; positive = forward scattering). -
scaleDepth
public float scaleDepthNormalized atmospheric scale depth (fraction of inner radius). Controls density falloff with altitude. -
params
-
-
Constructor Details
-
AtmosphereComponent
public AtmosphereComponent()
-
-
Method Details
-
doneLoading
-
update
-
setUpAtmosphericScatteringMaterial
Sets up the atmospheric scattering parameters to the given material- Parameters:
mat- The material to set up.
-
removeAtmosphericScattering
-
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, Vector3Q translation, RotationComponent rc, String inverseRefPlaneTransform, Vector3Q 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
-
setSize
-
setMc
-
setLocalTransform
public void setLocalTransform(com.badlogic.gdx.math.Matrix4 localTransform) -
setFogColor
public void setFogColor(double[] fogColor) -
setFogcolor
public void setFogcolor(double[] fogColor) -
setSamples
-
setNumSamples
-
setO3OpticalDepth
Sets the ozone vertical optical depth at red (Chappuis band, ~600 nm peak). Earth reference value: ~0.025. -
setO3strength
Deprecated.UsesetO3OpticalDepth(Double)instead.Legacy setter — maps the old 'o3Strength' JSON key to o3OpticalDepth. In JSON files, use 'o3OpticalDepth' for clarity. -
setMieAsymmetryG
-
setMieasymmetryg
-
setScaleDepth
-
setScaledepth
-
setFogDensity
-
setFogdensity
-
setM_Kr
-
setM_Km
-
setM_eSun
-
getWavelengths
public double[] getWavelengths() -
setWavelengths
public void setWavelengths(double[] wavelengths) -
setParams
-
randomizeAll
public void randomizeAll(long seed, double bodyRadius) Creates a random atmosphere component using the given seed and the base body size.- Parameters:
seed- The seed to use.bodyRadius- The body size in internal units.
-
copyFrom
-
print
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable
-
updateWith
- Specified by:
updateWithin interfaceIUpdatable<AtmosphereComponent>
-
setO3OpticalDepth(Double)instead.