本文整理汇总了Java中com.jme3.material.MaterialList.put方法的典型用法代码示例。如果您正苦于以下问题:Java MaterialList.put方法的具体用法?Java MaterialList.put怎么用?Java MaterialList.put使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.material.MaterialList
的用法示例。
在下文中一共展示了MaterialList.put方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import com.jme3.material.MaterialList; //导入方法依赖的package包/类
public MaterialList load(AssetManager assetManager, MaterialExtensionSet matExts, Scanner scan) throws IOException{
this.assetManager = assetManager;
this.matExts = matExts;
this.scan = scan;
list = new MaterialList();
if (scan.hasNext("import")){
scan.nextLine(); // skip this line
}
toploop: while (scan.hasNext()){
while (!scan.hasNext("material")){
if (!scan.hasNext())
break toploop;
scan.next();
}
Material material = readExtendingMaterial();
list.put(matName, material);
}
return list;
}
示例2: load
import com.jme3.material.MaterialList; //导入方法依赖的package包/类
public MaterialList load(AssetManager assetManager, AssetKey key, MaterialExtensionSet matExts,
List<Statement> statements) throws IOException{
this.assetManager = assetManager;
this.matExts = matExts;
this.key = key;
list = new MaterialList();
for (Statement statement : statements){
if (statement.getLine().startsWith("import")){
// ignore
continue;
}else if (statement.getLine().startsWith("material")){
Material material = readExtendingMaterial(statement);
list.put(matName, material);
List<String> matAliases = matExts.getNameMappings(matName);
if(matAliases != null){
for (String string : matAliases) {
list.put(string, material);
}
}
}
}
return list;
}