Class MaterialTechnique
- java.lang.Object
-
- be.yildizgames.module.graphic.material.MaterialTechnique
-
- All Implemented Interfaces:
Comparable<MaterialTechnique>
public abstract class MaterialTechnique extends Object implements Comparable<MaterialTechnique>
A technique is an element of a material, it contains MaterialPass.- Author:
- Grégory Van den Borre
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMaterialTechnique(int techniqueIndex)Protected constructor, only called from children.protectedMaterialTechnique(int techniqueIndex, List<MaterialPass> passList)Protected copy constructor, only called from children.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(MaterialTechnique other)Compare 2 MaterialTechnique based on their index number.protected abstract MaterialPasscreatePassImpl(int index)Call implementation to create a new MaterialPass.MaterialPasscreateTexturePass()Create a new MaterialPass and insert it in the list.booleanequals(Object obj)MaterialPassgetPass(int indexValue)Get a pass used with this technique, throws InvalidParameterException If no technique is found for the given parameter.inthashCode()voidsetGlow()Activate glow for this technique.protected abstract voidsetGlowImpl()Activate glow for this technique in implementation.
-
-
-
Constructor Detail
-
MaterialTechnique
protected MaterialTechnique(int techniqueIndex)
Protected constructor, only called from children.- Parameters:
techniqueIndex- Value of the index.
-
MaterialTechnique
protected MaterialTechnique(int techniqueIndex, List<MaterialPass> passList)Protected copy constructor, only called from children.- Parameters:
techniqueIndex- Value of the index.passList- List of pass contained in this technique.
-
-
Method Detail
-
createTexturePass
public final MaterialPass createTexturePass()
Create a new MaterialPass and insert it in the list.- Returns:
- The newly created MaterialPass.
-
createPassImpl
protected abstract MaterialPass createPassImpl(int index)
Call implementation to create a new MaterialPass.- Parameters:
index- Pass index.- Returns:
- the created pass.
-
getPass
public final MaterialPass getPass(int indexValue)
Get a pass used with this technique, throws InvalidParameterException If no technique is found for the given parameter.- Parameters:
indexValue- Index of the technique used, first is 0.- Returns:
- The associated technique.
-
setGlow
public final void setGlow()
Activate glow for this technique.
-
setGlowImpl
protected abstract void setGlowImpl()
Activate glow for this technique in implementation.
-
compareTo
public final int compareTo(MaterialTechnique other)
Compare 2 MaterialTechnique based on their index number.- Specified by:
compareToin interfaceComparable<MaterialTechnique>- Parameters:
other- Other technique to compare.- Returns:
- 0
-
-