Class Material
java.lang.Object
gaiasky.util.gdx.shader.attribute.Attributes
gaiasky.util.gdx.shader.Material
- All Implemented Interfaces:
Comparable<Attributes>, Iterable<Attribute>, Comparator<Attribute>
-
Field Summary
FieldsFields inherited from class Attributes
attributes, mask, sorted -
Constructor Summary
ConstructorsConstructorDescriptionMaterial()Create an empty materialCreate a material with the specified attributesCreate a material with the specified attributesCreate a material which is an exact copy of the specified materialCreate an empty materialCreate a material with the specified attributesCreate a material with the specified attributesCreate a material which is an exact copy of the specified material -
Method Summary
Methods inherited from class Attributes
attributesHash, clear, compare, compareTo, get, get, getMask, has, has, 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) final 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 booleanprotected 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
-
Field Details
-
id
-
-
Constructor Details
-
Material
public Material()Create an empty material -
Material
Create an empty material -
Material
Create a material with the specified attributes -
Material
-
Material
Create a material with the specified attributes -
Material
-
Material
Create a material which is an exact copy of the specified material -
Material
-
-
Method Details
-
copy
Create a copy of this material -
hashCode
public int hashCode()- Overrides:
hashCodein classAttributes
-
equals
- Specified by:
equalsin interfaceComparator<Attribute>- Overrides:
equalsin classAttributes
-