本文整理汇总了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);
}
}
}
示例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();
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}