Package gaiasky.scene.record
Class MaterialComponent
java.lang.Object
gaiasky.scene.record.NamedComponent
gaiasky.scene.record.MaterialComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IObserver
,IUpdatable<MaterialComponent>
,IComponent
,IMaterialProvider
public class MaterialComponent
extends NamedComponent
implements IObserver, IMaterialProvider, IUpdatable<MaterialComponent>
-
Field Summary
Modifier and TypeFieldDescriptioncom.badlogic.gdx.graphics.Texture
float
boolean
Add also color even if texture is presentfloat[]
float[]
float[]
Height scale in internal units.com.badlogic.gdx.math.Vector2
float[]
boolean
protected static final PFMTextureLoader.PFMTextureParameter
static CubemapComponent
float[]
float
float[]
com.badlogic.gdx.utils.Array<VirtualTextureComponent>
boolean
boolean
protected static final OwnTextureLoader.OwnTextureParameter
Default texture parametersprotected static final OwnTextureLoader.OwnTextureParameter
Default texture parametersFields inherited from class gaiasky.scene.record.NamedComponent
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VirtualTextureComponent
convertToComponent
(Map<Object, Object> map) void
copyFrom
(MaterialComponent 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 attributeIndex, com.badlogic.gdx.graphics.Texture tex) void
disposeTextures
(com.badlogic.gdx.assets.AssetManager manager) Disposes and unloads all currently loaded textures immediatelyboolean
boolean
hasSVT()
void
initialize
(String name) void
initialize
(String name, com.badlogic.gdx.assets.AssetManager manager) void
initMaterial
(com.badlogic.gdx.assets.AssetManager manager, IntModelInstance instance, float[] diffuseCol, boolean culling) void
initMaterial
(com.badlogic.gdx.assets.AssetManager manager, Material mat, Material ring, float[] diffuseCol, boolean culling) boolean
isFinishedLoading
(com.badlogic.gdx.assets.AssetManager manager) void
Event notification call.void
print
(Logger.Log log) void
randomizeAll
(long seed, double bodySize) void
void
setAmbientOcclusionCubemap
(String cubemap) void
void
setAoSVT
(VirtualTextureComponent virtualTextureComponent) void
void
Deprecated.void
setBiomehueshift
(Double hueShift) void
setBiomeHueShift
(Double hueShift) void
setBiomelut
(String biomeLookupTex) void
setBiomeLUT
(String biomeLookupTex) void
setColorIfTexture
(Boolean colorIfTexture) void
setDiffuse
(String diffuse) void
setDiffuseCubemap
(String cubemap) void
setDiffuseScattering
(double[] diffuseScattering) void
setDiffuseScattering
(Double diffuseScattering) void
setDiffuseSVT
(VirtualTextureComponent virtualTextureComponent) void
setDiffuseSVT
(Map<Object, Object> virtualTexture) void
setEmissive
(double[] emissive) void
setEmissive
(Double emissive) void
setEmissive
(String emissive) void
setEmissiveColormap
(String cubemap) void
setEmissiveSVT
(VirtualTextureComponent virtualTextureComponent) void
setEmissiveSVT
(Map<Object, Object> virtualTexture) void
setGenerated
(boolean generated) void
void
setHeightCubemap
(String cubemap) void
setHeightMapTopKm
(Double heightMapTopKm) void
setHeightMapTopM
(Double heightMapTopM) void
setHeightScale
(Double heightScale) void
setHeightScaleKm
(Double heightScale) void
setHeightScaleM
(Double heightScale) void
setHeightSVT
(VirtualTextureComponent virtualTextureComponent) void
setHeightSVT
(Map<Object, Object> virtualTexture) void
setMetallic
(Double metallicColor) void
setMetallic
(String metallic) void
setMetallicCubemap
(String cubemap) void
setMetallicSVT
(VirtualTextureComponent virtualTextureComponent) void
setMetallicSVT
(Map<Object, Object> virtualTexture) void
Deprecated.usesetEmissive(String)
insteadvoid
setNoise
(NoiseComponent noise) void
void
setNormalCubemap
(String cubemap) void
setNormalSVT
(VirtualTextureComponent virtualTextureComponent) void
setNormalSVT
(Map<Object, Object> virtualTexture) void
setOcclusionClouds
(boolean state) void
setOcclusionMetallicRoughness
(String texture) void
setReflection
(double[] metallic) void
setReflection
(Double metallicColor) Deprecated.usesetMetallic(String)
insteadvoid
setReflectionCubemap
(String reflectionCubemap) void
void
setRingDiffuse
(String ringDiffuse) void
setRingDiffuseScattering
(double[] ringDiffuseScattering) void
setRingDiffuseScattering
(Double ringDiffuseScattering) void
setRingnormal
(String ringNormal) void
setRingNormal
(String ringNormal) void
setRoughness
(Double roughness) void
setRoughness
(String roughness) void
setRoughnessCubemap
(String cubemap) void
setRoughnessSVT
(VirtualTextureComponent virtualTextureComponent) void
setRoughnessSVT
(Map<Object, Object> virtualTexture) void
void
setSpecular
(double[] specular) void
setSpecular
(Double specular) void
setSpecular
(String specular) void
setSpecularCubemap
(String cubemap) void
setSpecularSVT
(VirtualTextureComponent virtualTextureComponent) void
setSpecularSVT
(Map<Object, Object> virtualTexture) toString()
void
updateWith
(MaterialComponent object) Methods inherited from class gaiasky.scene.record.NamedComponent
createModelParameters, gaussian, gaussian, gaussian
-
Field Details
-
textureParamsMipMap
Default texture parameters -
textureParams
Default texture parameters -
pfmTextureParams
-
reflectionCubemap
-
texInitialised
public boolean texInitialised -
texLoading
public boolean texLoading -
diffuse
-
specular
-
normal
-
emissive
-
ring
-
height
-
ringnormal
-
roughness
-
metallic
-
ao
-
occlusionMetallicRoughness
-
diffuseUnpacked
-
specularUnpacked
-
normalUnpacked
-
emissiveUnpacked
-
ringUnpacked
-
heightUnpacked
-
ringnormalUnpacked
-
roughnessUnapcked
-
metallicUnpacked
-
aoUnpacked
-
occlusionMetallicRoughnessUnpacked
-
diffuseColor
public float[] diffuseColor -
specularColor
public float[] specularColor -
metallicColor
public float[] metallicColor -
emissiveColor
public float[] emissiveColor -
diffuseScatteringColor
public float[] diffuseScatteringColor -
ringDiffuseScatteringColor
public float[] ringDiffuseScatteringColor -
roughnessColor
public float roughnessColor -
heightScale
Height scale in internal units. The mapping value of white in the height map (maximum height value in this body). Black is mapped to 0. -
heightSize
public com.badlogic.gdx.math.Vector2 heightSize -
heightData
-
nc
-
diffuseSvt
-
specularSvt
-
heightSvt
-
normalSvt
-
emissiveSvt
-
roughnessSvt
-
metallicSvt
-
aoSvt
-
svts
-
diffuseCubemap
-
specularCubemap
-
normalCubemap
-
emissiveCubemap
-
heightCubemap
-
roughnessCubemap
-
metallicCubemap
-
aoCubemap
-
aoTexture
public com.badlogic.gdx.graphics.Texture aoTexture -
occlusionClouds
public boolean occlusionClouds -
biomeLUT
-
biomeHueShift
public float biomeHueShift -
colorIfTexture
public boolean colorIfTextureAdd also color even if texture is present
-
-
Constructor Details
-
MaterialComponent
public MaterialComponent()
-
-
Method Details
-
initialize
-
initialize
- Specified by:
initialize
in interfaceIComponent
- Overrides:
initialize
in classNamedComponent
-
isFinishedLoading
public boolean isFinishedLoading(com.badlogic.gdx.assets.AssetManager manager) -
hasSVT
public boolean hasSVT() -
initMaterial
public void initMaterial(com.badlogic.gdx.assets.AssetManager manager, IntModelInstance instance, float[] diffuseCol, boolean culling) -
initMaterial
-
setGenerated
public void setGenerated(boolean generated) -
getMaterial
- Specified by:
getMaterial
in interfaceIMaterialProvider
-
getRingMaterial
-
setBase
Deprecated.usesetDiffuse(String)
instead -
setDiffuse
-
setSpecular
-
setSpecular
-
setSpecular
public void setSpecular(double[] specular) -
setNormal
-
setNight
Deprecated.usesetEmissive(String)
instead -
setEmissive
-
setEmissive
-
setEmissive
public void setEmissive(double[] emissive) -
setDiffuseScattering
-
setDiffuseScattering
public void setDiffuseScattering(double[] diffuseScattering) -
setRing
-
setRingDiffuse
-
setRingnormal
-
setRingNormal
-
setRingDiffuseScattering
-
setRingDiffuseScattering
public void setRingDiffuseScattering(double[] ringDiffuseScattering) -
setHeight
-
setHeightScaleKm
-
setHeightScaleM
-
setHeightScale
-
setHeightMapTopKm
-
setHeightMapTopM
-
setColorIfTexture
-
setNoise
-
setBiomelut
-
setBiomeLUT
-
setBiomehueshift
-
setBiomeHueShift
-
setReflection
Deprecated.usesetMetallic(String)
instead -
setMetallic
-
setMetallic
-
setReflection
public void setReflection(double[] metallic) -
setRoughness
-
setRoughness
-
setAo
-
setOcclusionMetallicRoughness
-
setDiffuseCubemap
-
setNormalCubemap
-
setSpecularCubemap
-
setEmissiveColormap
-
setHeightCubemap
-
setMetallicCubemap
-
setRoughnessCubemap
-
setReflectionCubemap
-
setAmbientOcclusionCubemap
-
setOcclusionClouds
public void setOcclusionClouds(boolean state) -
setAmbientOcclusionCubemap
-
setSkybox
-
setDiffuseSVT
-
setDiffuseSVT
-
setSpecularSVT
-
setSpecularSVT
-
setNormalSVT
-
setNormalSVT
-
setHeightSVT
-
setHeightSVT
-
setEmissiveSVT
-
setEmissiveSVT
-
setMetallicSVT
-
setMetallicSVT
-
setRoughnessSVT
-
setRoughnessSVT
-
setAoSVT
-
setAoSVT
-
convertToComponent
-
hasHeight
public boolean hasHeight() -
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
-
notify
Description copied from interface:IObserver
Event notification call. -
getTexturesString
-
toString
-
copyFrom
-
randomizeAll
public void randomizeAll(long seed, double bodySize) -
print
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
updateWith
- Specified by:
updateWith
in interfaceIUpdatable<MaterialComponent>
-
setDiffuse(String)
instead