Package gaiasky.scene.record
Class CloudComponent
java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.CloudComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,IObserver,IUpdatable<CloudComponent>,IComponent,IMaterialProvider
public class CloudComponent
extends NamedComponent
implements IObserver, IMaterialProvider, IUpdatable<CloudComponent>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat[]RGB color of generated cloudscom.badlogic.gdx.math.Matrix4The material component associated to the same model.intfloatprotected static final OwnTextureLoader.OwnTextureParameterDefault texture parametersFields inherited from class gaiasky.scene.record.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) voiddisposeTexture(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) voidbooleanisFinishedLoading(com.badlogic.gdx.assets.AssetManager manager) voidEvent notification call.voidprint(Logger.Log log) voidrandomizeAll(long seed, double size) 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) voidvoidtouch()voidvoidupdateCullFace(double distToCamera) Updates the cull face strategy depending on the distance to the camera.voidupdateWith(CloudComponent object) Methods inherited from class gaiasky.scene.record.NamedComponent
createModelParameters, gaussian, gaussian, gaussian, initialize
-
Field Details
-
textureParams
Default texture parameters -
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
-
materialComponent
The material component associated to the same model. -
diffuseCubemap
-
diffuseSvt
-
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
public void 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
public void 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
-
removeAtmosphericScattering
-
setQuality
-
setSize
-
setMc
-
setLocalTransform
public void setLocalTransform(com.badlogic.gdx.math.Matrix4 localTransform) -
setParams
-
setCloud
-
setDiffuse
-
setNoise
-
setDiffuseCubemap
-
setDiffuseSVT
-
setDiffuseSVT
-
getMaterial
- Specified by:
getMaterialin interfaceIMaterialProvider
-
notify
Description copied from interface:IObserverEvent notification call. -
hasSVT
public boolean hasSVT() -
randomizeAll
public void randomizeAll(long seed, double size) 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.size- 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<CloudComponent>
-