|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.material.MaterialDef
public class MaterialDef
Describes a J3MD (Material definition).
Constructor Summary | |
---|---|
MaterialDef()
Serialization only. |
|
MaterialDef(AssetManager assetManager,
java.lang.String name)
Creates a new material definition with the given name. |
Method Summary | |
---|---|
void |
addMaterialParam(VarType type,
java.lang.String name,
java.lang.Object value,
FixedFuncBinding ffBinding)
Adds a new material parameter. |
void |
addTechniqueDef(TechniqueDef technique)
Adds a new technique definition to this material definition. |
AssetManager |
getAssetManager()
Returns the AssetManager passed in the constructor. |
java.lang.String |
getAssetName()
Returns the asset key name of the asset from which this material definition was loaded. |
java.util.List<TechniqueDef> |
getDefaultTechniques()
Returns a list of all default techniques. |
MatParam |
getMaterialParam(java.lang.String name)
Returns the material parameter with the given name. |
java.util.Collection<MatParam> |
getMaterialParams()
Returns a collection of all material parameters declared in this material definition. |
java.lang.String |
getName()
The debug name of the material definition. |
TechniqueDef |
getTechniqueDef(java.lang.String name)
Returns a technique definition with the given name. |
void |
setAssetName(java.lang.String assetName)
Set the asset key name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MaterialDef()
public MaterialDef(AssetManager assetManager, java.lang.String name)
assetManager
- The asset manager to use to load shadersname
- The debug name of the material definitionMethod Detail |
---|
public java.lang.String getAssetName()
public void setAssetName(java.lang.String assetName)
assetName
- the asset key namepublic AssetManager getAssetManager()
public java.lang.String getName()
public void addMaterialParam(VarType type, java.lang.String name, java.lang.Object value, FixedFuncBinding ffBinding)
type
- Type of the parametername
- Name of the parametervalue
- Default value of the parameterffBinding
- Fixed function binding for the parameterpublic MatParam getMaterialParam(java.lang.String name)
name
- The name of the parameter to retrieve
public java.util.Collection<MatParam> getMaterialParams()
Modifying the material parameters or the collection will lead to undefined results.
public void addTechniqueDef(TechniqueDef technique)
If the technique name is "Default", it will be added
to the list of default techniques
.
technique
- The technique definition to add.public java.util.List<TechniqueDef> getDefaultTechniques()
public TechniqueDef getTechniqueDef(java.lang.String name)
getDefaultTechniques()
.
name
- The name of the technique definition to find
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |