本文整理汇总了Java中com.jme3.export.InputCapsule.readStringSavableMap方法的典型用法代码示例。如果您正苦于以下问题:Java InputCapsule.readStringSavableMap方法的具体用法?Java InputCapsule.readStringSavableMap怎么用?Java InputCapsule.readStringSavableMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.export.InputCapsule
的用法示例。
在下文中一共展示了InputCapsule.readStringSavableMap方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule in = im.getCapsule(this);
skeleton = (Skeleton) in.readSavable("skeleton", null);
animationMap = (HashMap<String, BoneAnimation>) in.readStringSavableMap("animations", null);
if (im.getFormatVersion() == 0){
//changed for backward compatibility with j3o files generated before the AnimControl/SkeletonControl split
//if we find a target mesh array the AnimControl creates the SkeletonControl for old files and add it to the spatial.
//When backward compatibility won't be needed anymore this can deleted
Savable[] sav = in.readSavableArray("targets", null);
if (sav != null) {
Mesh[] targets = new Mesh[sav.length];
System.arraycopy(sav, 0, targets, 0, sav.length);
skeletonControl = new SkeletonControl(targets, skeleton);
spatial.addControl(skeletonControl);
}
}
}
示例2: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
name = ic.readString("name", null);
worldBound = (BoundingVolume) ic.readSavable("world_bound", null);
cullHint = ic.readEnum("cull_mode", CullHint.class, CullHint.Inherit);
queueBucket = ic.readEnum("queue", RenderQueue.Bucket.class,
RenderQueue.Bucket.Inherit);
shadowMode = ic.readEnum("shadow_mode", ShadowMode.class,
ShadowMode.Inherit);
localTransform = (Transform) ic.readSavable("transform", Transform.IDENTITY);
localLights = (LightList) ic.readSavable("lights", null);
localLights.setOwner(this);
//changed for backward compatibility with j3o files generated before the AnimControl/SkeletonControl split
//the AnimControl creates the SkeletonControl for old files and add it to the spatial.
//The SkeletonControl must be the last in the stack so we add the list of all other control before it.
//When backward compatibility won't be needed anymore this can be replaced by :
//controls = ic.readSavableArrayList("controlsList", null));
controls.addAll(0, ic.readSavableArrayList("controlsList", null));
userData = (HashMap<String, Savable>) ic.readStringSavableMap("user_data", null);
}
示例3: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
blenderKeys = (Map<String, BlenderKey>) ic.readStringSavableMap("keys", null);
lastUsedKey = (BlenderKey) ic.readSavable("last-key", null);
useModelKey = ic.readBoolean("use-model-key", false);
String logLevelName = ic.readString("log-level", Level.INFO.getName());
logLevel = logLevelName == null ? Level.INFO : Level.parse(logLevelName);
}
示例4: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException{
InputCapsule ic = im.getCapsule(this);
language = ic.readString("language", null);
shaderList = ic.readSavableArrayList("shaderList", null);
attribs = (IntMap<Attribute>) ic.readIntSavableMap("attribs", null);
HashMap<String, Uniform> uniMap = (HashMap<String, Uniform>) ic.readStringSavableMap("uniforms", null);
uniforms = new ListMap<String, Uniform>(uniMap);
}
示例5: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule ic = im.getCapsule(this);
cinematicEvents = ic.readSavableArrayList("cinematicEvents", null);
cameras = (Map<String, CameraNode>) ic.readStringSavableMap("cameras", null);
timeLine = (TimeLine) ic.readSavable("timeLine", null);
niftyXmlPath = ic.readString("niftyXmlPath", null);
}
示例6: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
id = ic.readString("id", null);
uniqueId = ic.readLong("uniqueId", 0);
localData = (HashMap<String, Savable>) ic.readStringSavableMap("localData", null);
}
示例7: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
additionalState = (RenderState) ic.readSavable("render_state", null);
transparent = ic.readBoolean("is_transparent", false);
// Load the material def
String defName = ic.readString("material_def", null);
HashMap<String, MatParam> params = (HashMap<String, MatParam>) ic.readStringSavableMap("parameters", null);
boolean enableVcolor = false;
boolean separateTexCoord = false;
if (im.getFormatVersion() == 0){
// Enable compatibility with old models
if (defName.equalsIgnoreCase("Common/MatDefs/Misc/VertexColor.j3md")){
// Using VertexColor, switch to Unshaded and set VertexColor=true
enableVcolor = true;
defName = "Common/MatDefs/Misc/Unshaded.j3md";
}else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/SimpleTextured.j3md")
|| defName.equalsIgnoreCase("Common/MatDefs/Misc/SolidColor.j3md")){
// Using SimpleTextured/SolidColor, just switch to Unshaded
defName = "Common/MatDefs/Misc/Unshaded.j3md";
}else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/WireColor.j3md")){
// Using WireColor, set wireframe renderstate = true and use Unshaded
additionalState.setWireframe(true);
defName = "Common/MatDefs/Misc/Unshaded.j3md";
}else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/Unshaded.j3md")){
// Uses unshaded, ensure that the proper param is set
MatParam value = params.get("SeperateTexCoord");
if (value != null && ((Boolean)value.getValue()) == true){
params.remove("SeperateTexCoord");
separateTexCoord = true;
}
}
}
def = (MaterialDef) im.getAssetManager().loadAsset(new AssetKey(defName));
paramValues = new ListMap<String, MatParam>();
// load the textures and update nextTexUnit
for (Map.Entry<String, MatParam> entry : params.entrySet()) {
MatParam param = entry.getValue();
if (param instanceof MatParamTexture) {
MatParamTexture texVal = (MatParamTexture) param;
if (nextTexUnit < texVal.getUnit() + 1) {
nextTexUnit = texVal.getUnit() + 1;
}
// the texture failed to load for this param
// do not add to param values
if (texVal.getTextureValue() == null || texVal.getTextureValue().getImage() == null) {
continue;
}
}
param.setName(checkSetParam(param.getVarType(), param.getName()));
paramValues.put(param.getName(), param);
}
if (enableVcolor){
setBoolean("VertexColor", true);
}
if (separateTexCoord){
setBoolean("SeparateTexCoord", true);
}
}