Package gaiasky.scene.record
Class AtmosphereComponent
java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.AtmosphereComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IUpdatable<AtmosphereComponent>
,IComponent
-
Field Summary
Modifier and TypeFieldDescriptioncom.badlogic.gdx.math.Vector3
float
com.badlogic.gdx.math.Matrix4
float
float
float
float
float
float
float
int
int
float
double[]
Fields inherited from class gaiasky.scene.record.NamedComponent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyFrom
(AtmosphereComponent other) void
dispose()
void
doneLoading
(Material planetMat, float planetSize) double[]
void
print
(Logger.Log log) void
randomizeAll
(long seed, double size) Creates a random atmosphere component using the given seed and the base body size.void
void
setFogcolor
(double[] fogColor) void
setFogColor
(double[] fogColor) void
setFogdensity
(Double fogDensity) void
setFogDensity
(Double fogDensity) void
setLocalTransform
(com.badlogic.gdx.math.Matrix4 localTransform) void
void
void
void
setMc
(ModelComponent mc) void
setNumSamples
(Long samples) void
void
setQuality
(Long quality) void
setSamples
(Long samples) void
void
Sets up the atmospheric scattering parameters to the given materialvoid
setWavelengths
(double[] wavelengths) void
void
updateAtmosphericScatteringParams
(Material mat, float alpha, boolean ground, GraphNode graph, Rotation rotation, ModelScaffolding scaffolding, Vector3d vrOffset) Updates the atmospheric scattering shader parameters.void
updateAtmosphericScatteringParams
(Material mat, float alpha, boolean ground, Vector3b translation, RotationComponent rc, String inverseRefPlaneTransform, Vector3b parentTranslation, Vector3d vrOffset) Updates the atmospheric scattering shader parameters.void
updateWith
(AtmosphereComponent object) Methods inherited from class gaiasky.scene.record.NamedComponent
createModelParameters, gaussian, gaussian, gaussian, initialize
-
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 -
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, Rotation rotation, 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.rotation
- 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
-
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
-
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 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
-
print
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
updateWith
- Specified by:
updateWith
in interfaceIUpdatable<AtmosphereComponent>
-