public class Material extends java.lang.Object implements java.lang.Iterable<MaterialAttribute>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasTexture
This flag is true if material contain TextureAttribute
|
protected java.lang.String |
name |
protected boolean |
needBlending
This flag is true if material contain blendingAttribute
|
protected ShaderProgram |
shader |
| Constructor and Description |
|---|
Material() |
Material(java.lang.String name,
Array<MaterialAttribute> attributes) |
Material(java.lang.String name,
MaterialAttribute... attributes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(MaterialAttribute... attributes) |
void |
bind() |
void |
bind(ShaderProgram program) |
protected void |
checkAttributes() |
void |
clearAttributes() |
Material |
copy() |
boolean |
equals(java.lang.Object obj) |
MaterialAttribute |
getAttribute(int index) |
java.lang.String |
getName() |
int |
getNumberOfAttributes() |
ShaderProgram |
getShader() |
int |
hashCode() |
boolean |
hasTexture() |
boolean |
isNeedBlending() |
java.util.Iterator<MaterialAttribute> |
iterator() |
void |
removeAttribute(MaterialAttribute... attributes) |
void |
resetShader() |
void |
setPooled(Material material) |
void |
setShader(ShaderProgram shader) |
boolean |
shaderEquals(Material other) |
protected java.lang.String name
protected boolean needBlending
protected boolean hasTexture
protected ShaderProgram shader
public Material()
public Material(java.lang.String name,
Array<MaterialAttribute> attributes)
public Material(java.lang.String name,
MaterialAttribute... attributes)
protected void checkAttributes()
public void bind()
public void bind(ShaderProgram program)
public java.lang.String getName()
public void addAttribute(MaterialAttribute... attributes)
public void removeAttribute(MaterialAttribute... attributes)
public void clearAttributes()
public MaterialAttribute getAttribute(int index)
public int getNumberOfAttributes()
public Material copy()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean shaderEquals(Material other)
public void setPooled(Material material)
public boolean isNeedBlending()
public boolean hasTexture()
public ShaderProgram getShader()
public void setShader(ShaderProgram shader)
public void resetShader()
public java.util.Iterator<MaterialAttribute> iterator()
iterator in interface java.lang.Iterable<MaterialAttribute>