当前位置: 首页>>代码示例>>Java>>正文


Java InputCapsule.readString方法代码示例

本文整理汇总了Java中com.jme3.export.InputCapsule.readString方法的典型用法代码示例。如果您正苦于以下问题:Java InputCapsule.readString方法的具体用法?Java InputCapsule.readString怎么用?Java InputCapsule.readString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jme3.export.InputCapsule的用法示例。


在下文中一共展示了InputCapsule.readString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    type = ic.readEnum("varType", VarType.class, null);
    name = ic.readString("name", null);
    ffBinding = ic.readEnum("ff_binding", FixedFuncBinding.class, null);
    switch (getVarType()) {
        case Boolean:
            value = ic.readBoolean("value_bool", false);
            break;
        case Float:
            value = ic.readFloat("value_float", 0f);
            break;
        case Int:
            value = ic.readInt("value_int", 0);
            break;
        default:
            value = ic.readSavable("value_savable", null);
            break;
    }
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:21,代码来源:MatParam.java

示例2: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    mesh = (Mesh) ic.readSavable("mesh", null);

    material = null;
    String matName = ic.readString("materialName", null);
    if (matName != null) {
        // Material name is set,
        // Attempt to load material via J3M
        try {
            material = im.getAssetManager().loadMaterial(matName);
        } catch (AssetNotFoundException ex) {
            // Cannot find J3M file.
            logger.log(Level.FINE, "Could not load J3M file {0} for Geometry.",
                    matName);
        }
    }
    // If material is NULL, try to load it from the geometry
    if (material == null) {
        material = (Material) ic.readSavable("material", null);
    }
    ignoreTransform = ic.readBoolean("ignoreTransform", false);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:26,代码来源:Geometry.java

示例3: 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);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:26,代码来源:Spatial.java

示例4: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    saveName = ic.readString("saveName", "unknow");
    saveTime = ic.readLong("saveTime", 0);
    storyCount = ic.readInt("storyCount", 0);
    player = (EntityData) ic.readSavable("player", null);
    ArrayList<ShortcutSave> tempShortcuts = ic.readSavableArrayList("shortcuts", null);
    shortcuts.clear();
    if (tempShortcuts != null) {
        shortcuts.addAll(tempShortcuts);
    }
    ArrayList<EntityData> tempActors = ic.readSavableArrayList("actors", null);
    actors.clear();
    if (tempActors != null) {
        actors.addAll(tempActors);
    }
    ArrayList<ClientData> tempClientDatas = ic.readSavableArrayList("clientDatas", null);
    clientDatas.clear();
    if (tempClientDatas != null) {
        clientDatas.addAll(tempClientDatas);
    }
}
 
开发者ID:huliqing,项目名称:LuoYing,代码行数:24,代码来源:SaveStory.java

示例5: 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);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:11,代码来源:ConfigDialog.java

示例6: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException{
    InputCapsule ic = im.getCapsule(this);
    name = ic.readString("name", null);
    vertName = ic.readString("vertName", null);
    fragName = ic.readString("fragName", null);
    shaderLang = ic.readString("shaderLang", null);
    presetDefines = (DefineList) ic.readSavable("presetDefines", null);
    lightMode = ic.readEnum("lightMode", LightMode.class, LightMode.Disable);
    shadowMode = ic.readEnum("shadowMode", ShadowMode.class, ShadowMode.Disable);
    renderState = (RenderState) ic.readSavable("renderState", null);
    usesShaders = ic.readBoolean("usesShaders", false);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:13,代码来源:TechniqueDef.java

示例7: 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);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:10,代码来源:Shader.java

示例8: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    objectId = ic.readString("itemId", null);
    x = ic.readFloat("x", 0);
    y = ic.readFloat("y", 0);
}
 
开发者ID:huliqing,项目名称:LuoYing,代码行数:8,代码来源:ShortcutSave.java

示例9: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter e) throws IOException {
    InputCapsule capsule = e.getCapsule(this);
    name = capsule.readString("name", null);
    key = (TextureKey) capsule.readSavable("key", null);
    
    // load texture from key, if available
    if (key != null) {
        // key is available, so try the texture from there.
        Texture loadedTex = e.getAssetManager().loadTexture(key);
        if (loadedTex == null) {
            Logger.getLogger(Texture.class.getName()).log(Level.SEVERE, "Could not load texture: {0}", key.toString());
        } else {
            image = loadedTex.getImage();
        }
    }else{
        // no key is set on the texture. Attempt to load an embedded image
        image = (Image) capsule.readSavable("image", null);
        if (image == null){
            // TODO: what to print out here? the texture has no key or data, there's no useful information .. 
            // assume texture.name is set even though the key is null
            Logger.getLogger(Texture.class.getName()).log(Level.SEVERE, "Could not load embedded image: {0}", toString() );
        }
    }

    anisotropicFilter = capsule.readInt("anisotropicFilter", 1);
    minificationFilter = capsule.readEnum("minificationFilter",
            MinFilter.class,
            MinFilter.BilinearNoMipMaps);
    magnificationFilter = capsule.readEnum("magnificationFilter",
            MagFilter.class, MagFilter.Bilinear);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:32,代码来源:Texture.java

示例10: 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);

}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:Cinematic.java

示例11: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    spatialName = ic.readString("spatialName", "");
    endPosition = (Vector3f) ic.readSavable("endPosition", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:PositionTrack.java

示例12: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    spatialName = ic.readString("spatialName", "");
    endScale = (Vector3f) ic.readSavable("endScale", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:ScaleTrack.java

示例13: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    spatialName = ic.readString("spatialName", "");
    endRotation = ic.readFloatArray("endRotation", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:RotationTrack.java

示例14: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    modelName = ic.readString("modelName", "");
    animationName = ic.readString("animationName", "");
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:AnimationTrack.java

示例15: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    clientId = ic.readString("clientId", null);
    gameId = ic.readString("gameId", null);
    actorId = ic.readLong("actorId", -1);
}
 
开发者ID:huliqing,项目名称:LuoYing,代码行数:8,代码来源:ClientData.java


注:本文中的com.jme3.export.InputCapsule.readString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。