Class CloudComponent
java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.CloudComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IUpdatable<CloudComponent>, IComponent, IMaterialProvider
public final class CloudComponent
extends NamedComponent
implements IMaterialProvider, IUpdatable<CloudComponent>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat[]RGB color of generated cloudsbooleanThe download has been finished.booleanThe download has been triggered.com.badlogic.gdx.math.Matrix4The material component associated to the same model.intfloatURL To pull cloud texture from.Location of the file pointed at by the URL on disk.Path to the downloaded file.booleanThe URL is valid.Fields inherited from class NamedComponent
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(CloudComponent other) voiddispose()voiddisposeCubemap(com.badlogic.gdx.assets.AssetManager manager, Material mat, int attributeIndex, CubemapComponent cubemap) voidvoiddisposeTexture(com.badlogic.gdx.assets.AssetManager manager, Material material, String name, String nameUnpacked, int texAttributeIndex, com.badlogic.gdx.graphics.Texture tex) voiddisposeTextures(com.badlogic.gdx.assets.AssetManager manager) Disposes and unloads all currently loaded textures immediatelyvoiddoneLoading(com.badlogic.gdx.assets.AssetManager manager) booleanhasSVT()voidinitialize(String name, boolean force) voidinitMaterial(Model model) booleanisFinishedLoading(com.badlogic.gdx.assets.AssetManager manager) voidprint(Logger.Log log) voidrandomizeAll(long seed, double bodyDiameter) Creates a random cloud component using the given seed and the base body size.voidvoidvoidsetDiffuse(String diffuse) voidsetDiffuseCubemap(String diffuseCubemap) voidsetDiffuseSVT(VirtualTextureComponent virtualTextureComponent) voidsetDiffuseSVT(Map<Object, Object> virtualTexture) voidsetGenerated(boolean generated) voidsetLocalTransform(com.badlogic.gdx.math.Matrix4 localTransform) voidsetMc(ModelComponent mc) voidsetNoise(NoiseComponent noise) voidvoidsetQuality(Long quality) voidvoidvoidvoidvoidupdateCullFace(double distToCamera) Updates the cull face strategy depending on the distance to the camera.voidupdateWith(CloudComponent object) Methods inherited from class NamedComponent
createModelParameters, gaussian, gaussian, gaussian, initialize
-
Field Details
-
quality
public int quality -
size
public float size -
nc
-
mc
-
localTransform
public com.badlogic.gdx.math.Matrix4 localTransform -
color
public float[] colorRGB color of generated clouds -
diffuse
-
diffuseUnpacked
-
url
URL To pull cloud texture from. Only regular diffuse texture supported (no cubemap, no SVT). -
urlValid
public boolean urlValidThe URL is valid. -
urlUnpacked
Path to the downloaded file. -
downloadTriggered
public boolean downloadTriggeredThe download has been triggered. -
downloadFinished
public boolean downloadFinishedThe download has been finished. -
urlLocation
Location of the file pointed at by the URL on disk. -
materialComponent
The material component associated to the same model. -
diffuseCubemap
-
diffuseSvt
-
svtParams
-
params
-
-
Constructor Details
-
CloudComponent
public CloudComponent()
-
-
Method Details
-
initialize
-
isFinishedLoading
public boolean isFinishedLoading(com.badlogic.gdx.assets.AssetManager manager) -
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager manager) -
touch
-
update
-
updateCullFace
public void updateCullFace(double distToCamera) Updates the cull face strategy depending on the distance to the camera.- Parameters:
distToCamera- The distance to the camera in internal units.
-
initMaterial
-
setGenerated
public void setGenerated(boolean generated) -
disposeTexture
-
disposeCubemap
public void disposeCubemap(com.badlogic.gdx.assets.AssetManager manager, Material mat, int attributeIndex, CubemapComponent cubemap) -
disposeTextures
public void disposeTextures(com.badlogic.gdx.assets.AssetManager manager) Disposes and unloads all currently loaded textures immediately- Parameters:
manager- The asset manager
-
disposeNoiseBuffers
public void disposeNoiseBuffers() -
removeAtmosphericScattering
-
setQuality
-
setSize
-
setMc
-
setLocalTransform
public void setLocalTransform(com.badlogic.gdx.math.Matrix4 localTransform) -
setParams
-
setCloud
-
setDiffuse
-
setUrl
-
setNoise
-
setDiffuseCubemap
-
setDiffuseSVT
-
setDiffuseSVT
-
getMaterial
- Specified by:
getMaterialin interfaceIMaterialProvider
-
hasSVT
public boolean hasSVT() -
randomizeAll
public void randomizeAll(long seed, double bodyDiameter) Creates a random cloud component using the given seed and the base body size. Generates a random cloud texture.- Parameters:
seed- The seed to use.bodyDiameter- The body diameter in internal units.
-
copyFrom
-
print
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable
-
updateWith
- Specified by:
updateWithin interfaceIUpdatable<CloudComponent>
-