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
Modifier and TypeFieldDescriptionfloat[]
RGB color of generated cloudscom.badlogic.gdx.math.Matrix4
The material component associated to the same model.int
float
protected static final OwnTextureLoader.OwnTextureParameter
Default texture parametersFields inherited from class gaiasky.scene.record.NamedComponent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyFrom
(CloudComponent other) void
dispose()
void
disposeCubemap
(com.badlogic.gdx.assets.AssetManager manager, Material mat, int attributeIndex, CubemapComponent cubemap) void
disposeTexture
(com.badlogic.gdx.assets.AssetManager manager, Material material, String name, String nameUnpacked, int texAttributeIndex, com.badlogic.gdx.graphics.Texture tex) void
disposeTextures
(com.badlogic.gdx.assets.AssetManager manager) Disposes and unloads all currently loaded textures immediatelyvoid
doneLoading
(com.badlogic.gdx.assets.AssetManager manager) boolean
hasSVT()
void
initialize
(String name, boolean force) void
boolean
isFinishedLoading
(com.badlogic.gdx.assets.AssetManager manager) void
Event notification call.void
print
(Logger.Log log) void
randomizeAll
(long seed, double size) Creates a random cloud component using the given seed and the base body size.void
void
void
setDiffuse
(String diffuse) void
setDiffuseCubemap
(String diffuseCubemap) void
setDiffuseSVT
(VirtualTextureComponent virtualTextureComponent) void
setDiffuseSVT
(Map<Object, Object> virtualTexture) void
setGenerated
(boolean generated) void
setLocalTransform
(com.badlogic.gdx.math.Matrix4 localTransform) void
setMc
(ModelComponent mc) void
setNoise
(NoiseComponent noise) void
void
setQuality
(Long quality) void
void
touch()
void
void
updateCullFace
(double distToCamera) Updates the cull face strategy depending on the distance to the camera.void
updateWith
(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:
getMaterial
in interfaceIMaterialProvider
-
notify
Description copied from interface:IObserver
Event 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:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
updateWith
- Specified by:
updateWith
in interfaceIUpdatable<CloudComponent>
-