Class EnvironmentCache
java.lang.Object
gaiasky.util.gdx.shader.attribute.Attributes
gaiasky.util.gdx.shader.Environment
gaiasky.util.gdx.model.gltf.scene3d.utils.EnvironmentCache
- All Implemented Interfaces:
Comparable<Attributes>, Iterable<Attribute>, Comparator<Attribute>
-
Field Summary
Fields inherited from class Environment
shadowMapModifier and TypeFieldDescriptioncom.badlogic.gdx.graphics.g3d.environment.ShadowMapShadow map used to render shadowsFields inherited from class Attributes
attributes, mask, sorted -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreplaceCache(Attribute attribute) fast way to replace an attribute without sortingvoidsetCache(Environment env) fast way to copy only referencesMethods inherited from class Environment
add, add, add, add, add, add, remove, remove, remove, remove, remove, removeModifier and TypeMethodDescriptionadd(com.badlogic.gdx.graphics.g3d.environment.BaseLight light) add(com.badlogic.gdx.graphics.g3d.environment.BaseLight... lights) add(com.badlogic.gdx.graphics.g3d.environment.DirectionalLight light) add(com.badlogic.gdx.graphics.g3d.environment.PointLight light) add(com.badlogic.gdx.graphics.g3d.environment.SpotLight light) add(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.g3d.environment.BaseLight> lights) remove(com.badlogic.gdx.graphics.g3d.environment.BaseLight light) remove(com.badlogic.gdx.graphics.g3d.environment.BaseLight... lights) remove(com.badlogic.gdx.graphics.g3d.environment.DirectionalLight light) remove(com.badlogic.gdx.graphics.g3d.environment.PointLight light) remove(com.badlogic.gdx.graphics.g3d.environment.SpotLight light) remove(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.g3d.environment.BaseLight> lights) Methods inherited from class Attributes
attributesHash, clear, compare, compareTo, equals, get, get, getMask, has, has, hashCode, indexOf, iterator, remove, remove, same, same, set, set, set, set, set, set, size, sortModifier and TypeMethodDescriptionintvoidclear()Removes all attributesfinal intUsed for sorting attributes by type (not by value)intcompareTo(Attributes other) booleanfinal Attributeget(int index) Example usage: ((BlendingAttribute)material.get(BlendingAttribute.ID)).sourceFunction;final <T extends Attribute>
TExample usage: ((BlendingAttribute)material.get(BlendingAttribute.ID)).sourceFunction;final BitsgetMask()final booleanhas(int index) final booleaninthashCode()protected intindexOf(int index) iterator()Used for iterating through the attributesfinal voidremove(int index) final voidRemoves the attribute from the material, i.e.: material.remove(BlendingAttribute.ID); Can also be used to remove multiple attributes also, i.e.final booleansame(Attributes other) final booleansame(Attributes other, boolean compareValues) Check if this collection has the same attributes as the other collection.final voidAdd an attribute to this material.final voidAdd an array of attributes to this material.final voidAdd multiple attributes to this material.final voidAdd multiple attributes to this material.final voidAdd multiple attributes to this material.final voidAdd an array of attributes to this material.intsize()final voidsort()Sort the attributes by their IDMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
EnvironmentCache
public EnvironmentCache()
-
-
Method Details
-
setCache
fast way to copy only references -
replaceCache
fast way to replace an attribute without sorting
-