本文整理汇总了Java中com.jme3.material.MaterialList.keySet方法的典型用法代码示例。如果您正苦于以下问题:Java MaterialList.keySet方法的具体用法?Java MaterialList.keySet怎么用?Java MaterialList.keySet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.material.MaterialList
的用法示例。
在下文中一共展示了MaterialList.keySet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadMtlLib
import com.jme3.material.MaterialList; //导入方法依赖的package包/类
protected void loadMtlLib(String name) throws IOException{
if (!name.toLowerCase().endsWith(".mtl"))
throw new IOException("Expected .mtl file! Got: " + name);
matList = (MaterialList) assetManager.loadAsset(key.getFolder() + name);
if (matList != null){
// create face lists for every material
for (String matName : matList.keySet()){
matFaces.put(matName, new ArrayList<Face>());
}
}else{
logger.log(Level.WARNING, "Can't find MTL file. " +
"Using default material for OBJ.");
}
}
示例2: loadMtlLib
import com.jme3.material.MaterialList; //导入方法依赖的package包/类
protected void loadMtlLib(String name) throws IOException{
if (!name.toLowerCase().endsWith(".mtl"))
throw new IOException("Expected .mtl file! Got: " + name);
// NOTE: Cut off any relative/absolute paths
name = new File(name).getName();
try {
matList = (MaterialList) assetManager.loadAsset(key.getFolder() + name);
} catch (AssetNotFoundException ex){
throw new AssetNotFoundException("Cannot find material " + name + " for model " + key.getName());
}
if (matList != null){
// create face lists for every material
for (String matName : matList.keySet()){
matFaces.put(matName, new ArrayList<Face>());
}
}else{
logger.log(Level.WARNING, "Can't find MTL file. " +
"Using default material for OBJ.");
}
}