Maven module :un.engine : engine-opengl :
Class : un.engine.opengl.material.Material
Extends/Implements : -
Subclasses : -

A material describe a stack of layers providing cumulative informations
on diffuse, ambient, specular and normal mapping.
author  Johann Sorel


Variables : -
Functions : Material, Material, getName, setName, isOpaque, putOrReplaceLayer, getLayers, getLayer, getCellShading, setCellShading, getAmbient, setAmbient, getSpecular, setSpecular, getDiffuse, setDiffuse, getShininess, setShininess, isDirty, dispose



public void Material ()


Copy a material.
param  material
public void Material (Material material)


Get material name.
return  Chars, not null
public CharArray getName ()


Set material name.
param  name not null.
public void setName (CharArray name)


Indicate if the material will generate an opaque objets.
This can be used to sort meshes for better rendering of translucent
objects.
return  true if final material color is fully opaque.
public boolean isOpaque ()


Add or replace layer with the same type.
param  layer
public void putOrReplaceLayer (Layer layer)

public Sequence getLayers ()


Get the first layer of given type.
param  type
return
public Layer getLayer (int type)

public int getCellShading ()

public void setCellShading (int cellShading)

public Color getAmbient ()

public void setAmbient (Color ambient)

public Color getSpecular ()

public void setSpecular (Color specular)

public Color getDiffuse ()

public void setDiffuse (Color diffuse)

public float getShininess ()

public void setShininess (float shininess)


Inddicate if some resources are not up to date.
return
public boolean isDirty ()


Dispose all used ressources.
param  context
public void dispose (GLProcessContext context)