本文整理了Java中com.jme3.scene.Geometry.getLodLevel()
方法的一些代码示例,展示了Geometry.getLodLevel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.getLodLevel()
方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!