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


Java InputCapsule.readSavableArray方法代码示例

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


在下文中一共展示了InputCapsule.readSavableArray方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
        }
    }
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:21,代码来源:AnimControl.java

示例2: read

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

    Savable[] boneRootsAsSav = input.readSavableArray("rootBones", null);
    rootBones = new Bone[boneRootsAsSav.length];
    System.arraycopy(boneRootsAsSav, 0, rootBones, 0, boneRootsAsSav.length);

    Savable[] boneListAsSavable = input.readSavableArray("boneList", null);
    boneList = new Bone[boneListAsSavable.length];
    System.arraycopy(boneListAsSavable, 0, boneList, 0, boneListAsSavable.length);

    createSkinningMatrices();

    for (Bone rootBone : rootBones) {
        rootBone.update();
        rootBone.setBindingPose();
    }
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:19,代码来源:Skeleton.java

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

示例4: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule in = im.getCapsule(this);
    Savable[] sav = in.readSavableArray("targets", null);
    if (sav != null) {
        targets = new Mesh[sav.length];
        System.arraycopy(sav, 0, targets, 0, sav.length);
    }
    skeleton = (Skeleton) in.readSavable("skeleton", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:SkeletonControl.java

示例5: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter i) throws IOException {
    InputCapsule in = i.getCapsule(this);
    name = in.readString("name", "");
    targetMeshIndex = in.readInt("meshIndex", -1);
    offsets = (Vector3f[]) in.readSavableArray("offsets", null);
    indices = in.readIntArray("indices", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:8,代码来源:Pose.java

示例6: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter i) throws IOException {
       InputCapsule in = i.getCapsule(this);
       name = in.readString("name", null);
       length = in.readFloat("length", 0f);

       Savable[] sav = in.readSavableArray("tracks", null);
       if (sav != null) {
           tracks = new BoneTrack[sav.length];
           System.arraycopy(sav, 0, tracks, 0, sav.length);
       }
   }
 
开发者ID:mleoking,项目名称:PhET,代码行数:13,代码来源:BoneAnimation.java

示例7: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    charSet = (BitmapCharacterSet) ic.readSavable("charSet", null);
    Savable[] pagesSavable = ic.readSavableArray("pages", null);
    pages = new Material[pagesSavable.length];
    System.arraycopy(pagesSavable, 0, pages, 0, pages.length);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:9,代码来源:BitmapFont.java

示例8: readCharset

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
private IntMap<BitmapCharacter> readCharset(InputCapsule ic, int style) throws IOException {
    IntMap<BitmapCharacter> charset = new IntMap<BitmapCharacter>();
    short[] indexes = ic.readShortArray("indexes"+style, null);
    Savable[] chars = ic.readSavableArray("chars"+style, null);

    for (int i = 0; i < indexes.length; i++){
        int index = indexes[i] & 0xFFFF;
        BitmapCharacter chr = (BitmapCharacter) chars[i];
        charset.put(index, chr);
    }
    return charset;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:13,代码来源:BitmapCharacterSet.java

示例9: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter i) throws IOException {
    InputCapsule in = i.getCapsule(this);
    name = in.readString("name", "");
    length = in.readFloat("length", -1f);
    tracks = (Track[]) in.readSavableArray("tracks", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:7,代码来源:MeshAnimation.java

示例10: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter i) throws IOException {
    InputCapsule in = i.getCapsule(this);
    poses = (Pose[]) in.readSavableArray("poses", null);
    weights = in.readFloatArray("weights", null);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:6,代码来源:PoseTrack.java

示例11: read

import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    list = (T[]) ic.readSavableArray("val", null);
}
 
开发者ID:huliqing,项目名称:LuoYing,代码行数:6,代码来源:SavableArray.java


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