com.jme3.material
クラス MaterialDef

java.lang.Object
  上位を拡張 com.jme3.material.MaterialDef

public class MaterialDef
extends java.lang.Object

Describes a J3MD (Material definition).


コンストラクタの概要
MaterialDef()
          Serialization only.
MaterialDef(AssetManager assetManager, java.lang.String name)
          Creates a new material definition with the given name.
 
メソッドの概要
 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.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.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

MaterialDef

public MaterialDef()
Serialization only. Do not use.


MaterialDef

public MaterialDef(AssetManager assetManager,
                   java.lang.String name)
Creates a new material definition with the given name.

パラメータ:
assetManager - The asset manager to use to load shaders
name - The debug name of the material definition
メソッドの詳細

getAssetName

public java.lang.String getAssetName()
Returns the asset key name of the asset from which this material definition was loaded.

戻り値:
Asset key name of the j3md file

setAssetName

public void setAssetName(java.lang.String assetName)
Set the asset key name.

パラメータ:
assetName - the asset key name

getAssetManager

public AssetManager getAssetManager()
Returns the AssetManager passed in the constructor.

戻り値:
the AssetManager passed in the constructor.

getName

public java.lang.String getName()
The debug name of the material definition.

戻り値:
debug name of the material definition.

addMaterialParam

public void addMaterialParam(VarType type,
                             java.lang.String name,
                             java.lang.Object value,
                             FixedFuncBinding ffBinding)
Adds a new material parameter.

パラメータ:
type - Type of the parameter
name - Name of the parameter
value - Default value of the parameter
ffBinding - Fixed function binding for the parameter

getMaterialParam

public MatParam getMaterialParam(java.lang.String name)
Returns the material parameter with the given name.

パラメータ:
name - The name of the parameter to retrieve
戻り値:
The material parameter, or null if it does not exist.

addTechniqueDef

public void addTechniqueDef(TechniqueDef technique)
Adds a new technique definition to this material definition.

If the technique name is "Default", it will be added to the list of default techniques.

パラメータ:
technique - The technique definition to add.

getDefaultTechniques

public java.util.List<TechniqueDef> getDefaultTechniques()
Returns a list of all default techniques.

戻り値:
a list of all default techniques.

getTechniqueDef

public TechniqueDef getTechniqueDef(java.lang.String name)
Returns a technique definition with the given name. This does not include default techniques which can be retrieved via getDefaultTechniques().

パラメータ:
name - The name of the technique definition to find
戻り値:
The technique definition, or null if cannot be found.