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


Java InputCapsule.readSavable方法代码示例

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


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

示例1: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule capsule = im.getCapsule(this);
    wheelSpatial = (Spatial) capsule.readSavable("wheelSpatial", null);
    frontWheel = capsule.readBoolean("frontWheel", false);
    location = (Vector3f) capsule.readSavable("wheelLocation", new Vector3f());
    direction = (Vector3f) capsule.readSavable("wheelDirection", new Vector3f());
    axle = (Vector3f) capsule.readSavable("wheelAxle", new Vector3f());
    suspensionStiffness = capsule.readFloat("suspensionStiffness", 20.0f);
    wheelsDampingRelaxation = capsule.readFloat("wheelsDampingRelaxation", 2.3f);
    wheelsDampingCompression = capsule.readFloat("wheelsDampingCompression", 4.4f);
    frictionSlip = capsule.readFloat("frictionSlip", 10.5f);
    rollInfluence = capsule.readFloat("rollInfluence", 1.0f);
    maxSuspensionTravelCm = capsule.readFloat("maxSuspensionTravelCm", 500f);
    maxSuspensionForce = capsule.readFloat("maxSuspensionForce", 6000f);
    radius = capsule.readFloat("wheelRadius", 0.5f);
    restLength = capsule.readFloat("restLength", 1f);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:19,代码来源:VehicleWheel.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);
    key = (AudioKey) ic.readSavable("key", null);
    loop = ic.readBoolean("looping", false);
    volume = ic.readFloat("volume", 1);
    pitch = ic.readFloat("pitch", 1);
    timeOffset = ic.readFloat("time_offset", 0);
    dryFilter = (Filter) ic.readSavable("dry_filter", null);

    velocity = (Vector3f) ic.readSavable("velocity", null);
    reverbEnabled = ic.readBoolean("reverb_enabled", false);
    reverbFilter = (Filter) ic.readSavable("reverb_filter", null);
    maxDistance = ic.readFloat("max_distance", 20);
    refDistance = ic.readFloat("ref_distance", 10);

    directional = ic.readBoolean("directional", false);
    direction = (Vector3f) ic.readSavable("direction", null);
    innerAngle = ic.readFloat("inner_angle", 360);
    outerAngle = ic.readFloat("outer_angle", 360);
    
    positional = ic.readBoolean("positional", false);
    
    data = im.getAssetManager().loadAudio(key);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:27,代码来源:AudioNode.java

示例3: 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

示例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
public void read(@NotNull final JmeImporter importer) throws IOException {
    final InputCapsule capsule = importer.getCapsule(this);
    sceneNode = (SceneNode) capsule.readSavable("sceneNode", null);
    threadingType = capsule.readEnum("threadingType", ThreadingType.class, ThreadingType.SEQUENTIAL);
    broadphaseType = capsule.readEnum("broadphaseType", BroadphaseType.class, BroadphaseType.DBVT);
    worldMin = (Vector3f) capsule.readSavable("worldMin", null);
    worldMax = (Vector3f) capsule.readSavable("worldMax", null);
    speed = capsule.readFloat("speed", 0);
    debugEnabled = capsule.readBoolean("debugEnabled", false);
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder-extension,代码行数:12,代码来源:EditableBulletSceneAppState.java

示例6: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(@NotNull final JmeImporter im) throws IOException {
    final InputCapsule in = im.getCapsule(this);
    lightProbe = (LightProbe) in.readSavable("lightProbe", null);
    pbrScene = (Node) in.readSavable("pbrScene", null);
    environmentScene = (Node) in.readSavable("environmentScene", null);
    generationType = in.readEnum("generationType", GenerationType.class, GenerationType.Fast);
    frame = in.readInt("frame", 0);
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder-extension,代码行数:10,代码来源:StaticLightProbeSceneAppState.java

示例7: 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

示例8: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule capsule = im.getCapsule(this);
    halfExtents = (Vector3f) capsule.readSavable("halfExtents", new Vector3f(0.5f, 0.5f, 0.5f));
    axis = capsule.readInt("axis", 1);
    createShape();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:CylinderCollisionShape.java

示例9: 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

示例10: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter e) throws IOException {
    InputCapsule capsule = e.getCapsule(this);
    collisionGroup = capsule.readInt("collisionGroup", 0x00000001);
    collisionGroupsMask = capsule.readInt("collisionGroupsMask", 0x00000001);
    debugShape = (Spatial) capsule.readSavable("debugShape", null);
    CollisionShape shape = (CollisionShape) capsule.readSavable("collisionShape", null);
    collisionShape = shape;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:10,代码来源:PhysicsCollisionObject.java

示例11: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule capsule = im.getCapsule(this);
    worldScale = (Vector3f) capsule.readSavable("worldScale", new Vector3f(1, 1, 1));
    numVertices = capsule.readInt("numVertices", 0);
    numTriangles = capsule.readInt("numTriangles", 0);
    vertexStride = capsule.readInt("vertexStride", 0);
    triangleIndexStride = capsule.readInt("triangleIndexStride", 0);

    triangleIndexBase = ByteBuffer.wrap(capsule.readByteArray("triangleIndexBase", new byte[0]));
    vertexBase = ByteBuffer.wrap(capsule.readByteArray("vertexBase", new byte[0]));
    createShape();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:14,代码来源:GImpactCollisionShape.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);
    position = (Vector3f) ic.readSavable("position", null);
    radius = ic.readFloat("radius", 0f);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:PointLight.java

示例13: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule capsule = im.getCapsule(this);
    vector1 = (Vector3f) capsule.readSavable("simplexPoint1", null);
    vector2 = (Vector3f) capsule.readSavable("simplexPoint2", null);
    vector3 = (Vector3f) capsule.readSavable("simplexPoint3", null);
    vector4 = (Vector3f) capsule.readSavable("simplexPoint4", null);
    createShape();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:10,代码来源:SimplexCollisionShape.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);
    direction = (Vector3f) ic.readSavable("direction", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:7,代码来源:DirectionalLight.java

示例15: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule capsule = im.getCapsule(this);
    plane = (Plane) capsule.readSavable("collisionPlane", new Plane());
    createShape();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:7,代码来源:PlaneCollisionShape.java


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