com.jme3.scene.Geometry.read()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中com.jme3.scene.Geometry.read()方法的一些代码示例,展示了Geometry.read()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.read()方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:read

Geometry.read介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

@Override
  public void read(JmeImporter importer) throws IOException {
    super.read(importer);
    InputCapsule capsule = importer.getCapsule(this);
    //currentNumInstances = capsule.readInt("cur_num_instances", 1);

    Savable[] geometrySavables = capsule.readSavableArray("geometries", null);
    geometries = new Geometry[geometrySavables.length];
    for (int i = 0; i < geometrySavables.length; i++) {
      geometries[i] = (Geometry) geometrySavables[i];
    }
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

@Override
public void read(JmeImporter im) throws IOException {
  super.read(im);
  InputCapsule ic = im.getCapsule(this);
  size = ic.readInt("size", 16);
  totalSize = ic.readInt("totalSize", 16);
  quadrant = ic.readShort("quadrant", (short)0);
  stepScale = (Vector3f) ic.readSavable("stepScale", Vector3f.UNIT_XYZ);
  offset = (Vector2f) ic.readSavable("offset", Vector3f.UNIT_XYZ);
  offsetAmount = ic.readFloat("offsetAmount", 0);
  //lodCalculator = (LodCalculator) ic.readSavable("lodCalculator", new DistanceLodCalculator());
  //lodCalculator.setTerrainPatch(this);
  //lodCalculatorFactory = (LodCalculatorFactory) ic.readSavable("lodCalculatorFactory", null);
  lodEntropy = ic.readFloatArray("lodEntropy", null);
  geomap = (LODGeomap) ic.readSavable("geomap", null);
  Mesh regen = geomap.createMesh(stepScale, new Vector2f(1,1), offset, offsetAmount, totalSize, false);
  setMesh(regen);
  //TangentBinormalGenerator.generate(this); // note that this will be removed
  ensurePositiveVolumeBBox();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

@Override
public void read(JmeImporter im) throws IOException {
  super.read(im);
  InputCapsule ic = im.getCapsule(this);
  shape = (EmitterShape) ic.readSavable("shape", DEFAULT_SHAPE);

代码示例来源:origin: org.jmonkeyengine/jme3-core

@Override
  public void read(JmeImporter importer) throws IOException {
    super.read(importer);
    InputCapsule capsule = importer.getCapsule(this);
    //currentNumInstances = capsule.readInt("cur_num_instances", 1);

    Savable[] geometrySavables = capsule.readSavableArray("geometries", null);
    geometries = new Geometry[geometrySavables.length];
    for (int i = 0; i < geometrySavables.length; i++) {
      geometries[i] = (Geometry) geometrySavables[i];
    }
  }
}

代码示例来源:origin: info.projectkyoto/mms-engine

@Override
public void read(JmeImporter im) throws IOException {
  super.read(im);
  InputCapsule c = im.getCapsule(this);
  glslSkinningMaterial = (Material)c.readSavable("glslSkinningMaterial", null);
  noSkinningMaterial = (Material)c.readSavable("noSkinningMaterial", null);
}

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-terrain

@Override
public void read(JmeImporter im) throws IOException {
  super.read(im);
  InputCapsule ic = im.getCapsule(this);
  size = ic.readInt("size", 16);
  totalSize = ic.readInt("totalSize", 16);
  quadrant = ic.readShort("quadrant", (short)0);
  stepScale = (Vector3f) ic.readSavable("stepScale", Vector3f.UNIT_XYZ);
  offset = (Vector2f) ic.readSavable("offset", Vector3f.UNIT_XYZ);
  offsetAmount = ic.readFloat("offsetAmount", 0);
  //lodCalculator = (LodCalculator) ic.readSavable("lodCalculator", new DistanceLodCalculator());
  //lodCalculator.setTerrainPatch(this);
  //lodCalculatorFactory = (LodCalculatorFactory) ic.readSavable("lodCalculatorFactory", null);
  lodEntropy = ic.readFloatArray("lodEntropy", null);
  geomap = (LODGeomap) ic.readSavable("geomap", null);
  
  Mesh regen = geomap.createMesh(stepScale, new Vector2f(1,1), offset, offsetAmount, totalSize, false);
  setMesh(regen);
  //TangentBinormalGenerator.generate(this); // note that this will be removed
  ensurePositiveVolumeBBox();
}

代码示例来源:origin: info.projectkyoto/mms-engine

@Override
public void read(JmeImporter im) throws IOException {
  super.read(im);
  InputCapsule ic = im.getCapsule(this);
  shape = (EmitterShape) ic.readSavable("shape", DEFAULT_SHAPE);

代码示例来源:origin: org.jmonkeyengine/jme3-core

@Override
public void read(JmeImporter im) throws IOException {
  super.read(im);
  InputCapsule ic = im.getCapsule(this);
  shape = (EmitterShape) ic.readSavable("shape", DEFAULT_SHAPE);

相关文章