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

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

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

Geometry.getLodLevel介绍

[英]Returns the LOD level set with #setLodLevel(int).
[中]

代码示例

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

public static void renderMeshFromGeometry(Renderer renderer, Geometry geom) {
  Mesh mesh = geom.getMesh();
  int lodLevel = geom.getLodLevel();
  if (geom instanceof InstancedGeometry) {
    InstancedGeometry instGeom = (InstancedGeometry) geom;
    renderer.renderMesh(mesh, lodLevel, instGeom.getActualNumInstances(),
        instGeom.getAllInstanceData());
  } else {
    renderer.renderMesh(mesh, lodLevel, 1, null);
  }
}

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

private InstancedGeometry lookUpByGeometry(Geometry geom) {
  lookUp.mesh = geom.getMesh();
  lookUp.material = geom.getMaterial();
  lookUp.lodLevel = geom.getLodLevel();
  InstancedGeometry ig = instancesMap.get(lookUp);
  if (ig == null) {
    ig = new InstancedGeometry(
        "mesh-" + System.identityHashCode(lookUp.mesh) + "," +
        "material-" + lookUp.material.getMaterialDef().getName() + ","
        + "lod-" + lookUp.lodLevel);
    ig.setMaterial(lookUp.material);
    ig.setMesh(lookUp.mesh);
    ig.setUserData(UserData.JME_PHYSICSIGNORE, true);
    ig.setCullHint(CullHint.Never);
    ig.setShadowMode(RenderQueue.ShadowMode.Inherit);
    instancesMap.put(lookUp.clone(), ig);
    attachChild(ig);
  }
  return ig;
}

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

public static void renderMeshFromGeometry(Renderer renderer, Geometry geom) {
  Mesh mesh = geom.getMesh();
  int lodLevel = geom.getLodLevel();
  if (geom instanceof InstancedGeometry) {
    InstancedGeometry instGeom = (InstancedGeometry) geom;
    renderer.renderMesh(mesh, lodLevel, instGeom.getActualNumInstances(),
        instGeom.getAllInstanceData());
  } else {
    renderer.renderMesh(mesh, lodLevel, 1, null);
  }
}

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

private InstancedGeometry lookUpByGeometry(Geometry geom) {
  lookUp.mesh = geom.getMesh();
  lookUp.material = geom.getMaterial();
  lookUp.lodLevel = geom.getLodLevel();
  InstancedGeometry ig = instancesMap.get(lookUp);
  if (ig == null) {
    ig = new InstancedGeometry(
        "mesh-" + System.identityHashCode(lookUp.mesh) + "," +
        "material-" + lookUp.material.getMaterialDef().getName() + ","
        + "lod-" + lookUp.lodLevel);
    ig.setMaterial(lookUp.material);
    ig.setMesh(lookUp.mesh);
    ig.setUserData(UserData.JME_PHYSICSIGNORE, true);
    ig.setCullHint(CullHint.Never);
    ig.setShadowMode(RenderQueue.ShadowMode.Inherit);
    instancesMap.put(lookUp.clone(), ig);
    attachChild(ig);
  }
  return ig;
}

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

r.renderMesh(g.getMesh(), g.getLodLevel(), 1);
lightPos.setValue(VarType.Vector4, nullDirLight);
r.setShader(shader);
r.renderMesh(g.getMesh(), g.getLodLevel(), 1);

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

r.renderMesh(geom.getMesh(), geom.getLodLevel(), 1);

相关文章