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


Java InputCapsule.readEnum方法代码示例

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


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

示例1: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter e) throws IOException {
    InputCapsule capsule = e.getCapsule(this);
    format = capsule.readEnum("format", Format.class, Format.RGBA8);
    width = capsule.readInt("width", 0);
    height = capsule.readInt("height", 0);
    depth = capsule.readInt("depth", 0);
    mipMapSizes = capsule.readIntArray("mipMapSizes", null);
    multiSamples = capsule.readInt("multiSamples", 1);
    data = (ArrayList<ByteBuffer>) capsule.readByteBufferArrayList("data", null);
    colorSpace = capsule.readEnum("colorSpace", ColorSpace.class, null);

    if (mipMapSizes != null) {
        needGeneratedMips = false;
        mipsWereGenerated = true;
    }
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:17,代码来源:Image.java

示例2: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule in = im.getCapsule(this);

    controlPoints = (ArrayList<Vector3f>) in.readSavableArrayList("wayPoints", null);
    float list[] = in.readFloatArray("segmentsLength", null);
    if (list != null) {
        segmentsLength = new ArrayList<Float>();
        for (int i = 0; i < list.length; i++) {
            segmentsLength.add(new Float(list[i]));
        }
    }
    type = in.readEnum("pathSplineType", SplineType.class, SplineType.CatmullRom);
    totalLength = in.readFloat("totalLength", 0);
    CRcontrolPoints = (ArrayList<Vector3f>) in.readSavableArrayList("CRControlPoints", null);
    curveTension = in.readFloat("curveTension", 0.5f);
    cycle = in.readBoolean("cycle", false);
    knots = in.readSavableArrayList("knots", null);
    weights = in.readFloatArray("weights", null);
    basisFunctionDegree = in.readInt("basisFunctionDegree", 0);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:22,代码来源:Spline.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包/类
public void read(JmeImporter im) throws IOException {
        InputCapsule in = im.getCapsule(this);
        meshBound = (BoundingVolume) in.readSavable("modelBound", null);
        vertCount = in.readInt("vertCount", -1);
        elementCount = in.readInt("elementCount", -1);
        maxNumWeights = in.readInt("max_num_weights", -1);
        mode = in.readEnum("mode", Mode.class, Mode.Triangles);
        elementLengths = in.readIntArray("elementLengths", null);
        modeStart = in.readIntArray("modeStart", null);
        collisionTree = (BIHTree) in.readSavable("collisionTree", null);
        elementLengths = in.readIntArray("elementLengths", null);
        modeStart = in.readIntArray("modeStart", null);
        pointSize = in.readFloat("pointSize", 1f);

//        in.readStringSavableMap("buffers", null);
        buffers = (IntMap<VertexBuffer>) in.readIntSavableMap("buffers", null);
        for (Entry<VertexBuffer> entry : buffers){
            buffersList.add(entry.getValue());
        }
        
        Savable[] lodLevelsSavable = in.readSavableArray("lodLevels", null);
        if (lodLevelsSavable != null) {
            lodLevels = new VertexBuffer[lodLevelsSavable.length];
            System.arraycopy( lodLevelsSavable, 0, lodLevels, 0, lodLevels.length);
        }
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:27,代码来源:Mesh.java

示例5: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    pointSprite = ic.readBoolean("pointSprite", false);
    wireframe = ic.readBoolean("wireframe", false);
    cullMode = ic.readEnum("cullMode", FaceCullMode.class, FaceCullMode.Back);
    depthWrite = ic.readBoolean("depthWrite", true);
    depthTest = ic.readBoolean("depthTest", true);
    colorWrite = ic.readBoolean("colorWrite", true);
    blendMode = ic.readEnum("blendMode", BlendMode.class, BlendMode.Off);
    alphaTest = ic.readBoolean("alphaTest", false);
    alphaFallOff = ic.readFloat("alphaFallOff", 0);
    offsetEnabled = ic.readBoolean("offsetEnabled", false);
    offsetFactor = ic.readFloat("offsetFactor", 0);
    offsetUnits = ic.readFloat("offsetUnits", 0);
    stencilTest = ic.readBoolean("stencilTest", false);
    frontStencilStencilFailOperation = ic.readEnum("frontStencilStencilFailOperation", StencilOperation.class, StencilOperation.Keep);
    frontStencilDepthFailOperation = ic.readEnum("frontStencilDepthFailOperation", StencilOperation.class, StencilOperation.Keep);
    frontStencilDepthPassOperation = ic.readEnum("frontStencilDepthPassOperation", StencilOperation.class, StencilOperation.Keep);
    backStencilStencilFailOperation = ic.readEnum("backStencilStencilFailOperation", StencilOperation.class, StencilOperation.Keep);
    backStencilDepthFailOperation = ic.readEnum("backStencilDepthFailOperation", StencilOperation.class, StencilOperation.Keep);
    backStencilDepthPassOperation = ic.readEnum("backStencilDepthPassOperation", StencilOperation.class, StencilOperation.Keep);
    frontStencilFunction = ic.readEnum("frontStencilFunction", TestFunction.class, TestFunction.Always);
    backStencilFunction = ic.readEnum("backStencilFunction", TestFunction.class, TestFunction.Always);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:25,代码来源:RenderState.java

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

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

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

示例9: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException{
    InputCapsule ic = im.getCapsule(this);
    shaderType = ic.readEnum("shaderType", ShaderType.class, null);
    name = ic.readString("name", null);
    source = ic.readString("source", null);
    defines = ic.readString("defines", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:Shader.java

示例10: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule in = im.getCapsule(this);
    lookAt = (Vector3f) in.readSavable("lookAt", Vector3f.ZERO);
    upVector = (Vector3f) in.readSavable("upVector", Vector3f.UNIT_Y);
    rotation = (Quaternion) in.readSavable("rotation", Quaternion.IDENTITY);
    directionType = in.readEnum("directionType", Direction.class, Direction.None);
    path = (MotionPath) in.readSavable("path", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:11,代码来源:MotionTrack.java

示例11: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    playState = ic.readEnum("playState", PlayState.class, PlayState.Stopped);
    speed = ic.readFloat("speed", 1);
    initialDuration = ic.readFloat("initalDuration", 10);
    duration = initialDuration / speed;
    loopMode = ic.readEnum("loopMode", LoopMode.class, LoopMode.DontLoop);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:9,代码来源:AbstractCinematicEvent.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);
    glowMode = ic.readEnum("glowMode", GlowMode.class, GlowMode.Scene);
    blurScale = ic.readFloat("blurScale", 1.5f);
    exposurePower = ic.readFloat("exposurePower", 5.0f);
    exposureCutOff = ic.readFloat("exposureCutOff", 0.0f);
    bloomIntensity = ic.readFloat("bloomIntensity", 2.0f);
    downSamplingFactor = ic.readFloat("downSamplingFactor", 1);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:BloomFilter.java

示例13: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter e) throws IOException {
    super.read(e);
    InputCapsule capsule = e.getCapsule(this);
    orient = (Matrix3f) capsule.readSavable("orient", null);
    look = (Vector3f) capsule.readSavable("look", null);
    left = (Vector3f) capsule.readSavable("left", null);
    alignment = capsule.readEnum("alignment", Alignment.class, Alignment.Screen);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:10,代码来源:BillboardControl.java

示例14: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    components = ic.readInt("components", 0);
    usage = ic.readEnum("usage", Usage.class, Usage.Dynamic);
    bufType = ic.readEnum("buffer_type", Type.class, null);
    format = ic.readEnum("format", Format.class, Format.Float);
    normalized = ic.readBoolean("normalized", false);
    offset = ic.readInt("offset", 0);
    stride = ic.readInt("stride", 0);
    componentsLength = components * format.getComponentSize();

    String dataName = "data" + format.name();
    switch (format){
        case Float:
            data = ic.readFloatBuffer(dataName, null);
            break;
        case Short:
        case UnsignedShort:
            data = ic.readShortBuffer(dataName, null);
            break;
        case UnsignedByte:
        case Byte:
        case Half:
            data = ic.readByteBuffer(dataName, null);
            break;
        case Int:
        case UnsignedInt:
            data = ic.readIntBuffer(dataName, null);
            break;
        default:
            throw new IOException("Unsupported import buffer format: "+format);
    }
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:34,代码来源:VertexBuffer.java

示例15: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter e) throws IOException {
    super.read(e);
    InputCapsule capsule = e.getCapsule(this);
    zSamples = capsule.readInt("zSamples", 0);
    radialSamples = capsule.readInt("radialSamples", 0);
    radius = capsule.readFloat("radius", 0);
    useEvenSlices = capsule.readBoolean("useEvenSlices", false);
    textureMode = capsule.readEnum("textureMode", TextureMode.class, TextureMode.Original);
    interior = capsule.readBoolean("interior", false);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:11,代码来源:Sphere.java


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