本文整理了Java中com.jme3.scene.Mesh.setLodLevels()
方法的一些代码示例,展示了Mesh.setLodLevels()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mesh.setLodLevels()
方法的具体详情如下:
包路径:com.jme3.scene.Mesh
类名称:Mesh
方法名:setLodLevels
[英]Set the LOD (level of detail) index buffers on this mesh.
[中]在此网格上设置LOD(细节级别)索引缓冲区。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Computes the lods and bake them into the mesh<br>
*
* This method must be fed with the reduction method
* {@link TriangleReductionMethod} and a list of reduction values.<br> for
* each value a lod will be generated. <p> <strong>Important note :</strong>
* some meshes cannot be decimated, so the result of this method can vary
* depending of the given mesh. Also the reduction values are indicative and
* the produces mesh will not always meet the required reduction.
*
* @param reductionMethod the reduction method to use
* @param reductionValues the reduction value to use for each lod level.
*/
public void bakeLods(TriangleReductionMethod reductionMethod, float... reductionValues) {
mesh.setLodLevels(computeLods(reductionMethod, reductionValues));
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void endLevelOfDetail() {
// set the lod data for each mesh
for (Entry<List<VertexBuffer>> entry : lodLevels) {
Mesh m = geoms.get(entry.getKey()).getMesh();
List<VertexBuffer> levels = entry.getValue();
VertexBuffer[] levelArray = new VertexBuffer[levels.size()];
levels.toArray(levelArray);
m.setLodLevels(levelArray);
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
lods[i].setupData(Usage.Dynamic, 1, Format.UnsignedInt, BufferUtils.createIntBuffer(lodData[i]));
outMesh.setLodLevels(lods);
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Computes the lods and bake them into the mesh<br>
*
* This method must be fed with the reduction method
* {@link TriangleReductionMethod} and a list of reduction values.<br> for
* each value a lod will be generated. <p> <strong>Important note :</strong>
* some meshes cannot be decimated, so the result of this method can vary
* depending of the given mesh. Also the reduction values are indicative and
* the produces mesh will not always meet the required reduction.
*
* @param reductionMethod the reduction method to use
* @param reductionValues the reduction value to use for each lod level.
*/
public void bakeLods(TriangleReductionMethod reductionMethod, float... reductionValues) {
mesh.setLodLevels(computeLods(reductionMethod, reductionValues));
}
代码示例来源:origin: org.jmonkeyengine/jme3-plugins
private void endLevelOfDetail() {
// set the lod data for each mesh
for (Entry<List<VertexBuffer>> entry : lodLevels) {
Mesh m = geoms.get(entry.getKey()).getMesh();
List<VertexBuffer> levels = entry.getValue();
VertexBuffer[] levelArray = new VertexBuffer[levels.size()];
levels.toArray(levelArray);
m.setLodLevels(levelArray);
}
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-plugins
private void endLevelOfDetail() {
// set the lod data for each mesh
for (Entry<List<VertexBuffer>> entry : lodLevels) {
Mesh m = geoms.get(entry.getKey()).getMesh();
List<VertexBuffer> levels = entry.getValue();
VertexBuffer[] levelArray = new VertexBuffer[levels.size()];
levels.toArray(levelArray);
m.setLodLevels(levelArray);
}
}
代码示例来源:origin: info.projectkyoto/mms-engine
private void endLevelOfDetail() {
// set the lod data for each mesh
for (Entry<List<VertexBuffer>> entry : lodLevels) {
Mesh m = geoms.get(entry.getKey()).getMesh();
List<VertexBuffer> levels = entry.getValue();
VertexBuffer[] levelArray = new VertexBuffer[levels.size()];
levels.toArray(levelArray);
m.setLodLevels(levelArray);
}
}
代码示例来源:origin: tonihele/OpenKeeper
mesh.setBuffer(Type.BindPosePosition, 3, BufferUtils.createFloatBuffer(vertices));
mesh.setBuffer(lodLevels[0]);
mesh.setLodLevels(lodLevels);
mesh.setBuffer(Type.TexCoord, 2, BufferUtils.createFloatBuffer(texCoord));
mesh.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
代码示例来源:origin: org.jmonkeyengine/jme3-core
lods[i].setupData(Usage.Dynamic, 1, Format.UnsignedInt, BufferUtils.createIntBuffer(lodData[i]));
outMesh.setLodLevels(lods);
代码示例来源:origin: info.projectkyoto/mms-engine
outMesh.setLodLevels(lods);
代码示例来源:origin: tonihele/OpenKeeper
mesh.setLodLevels(lodLevels);
mesh.setBuffer(Type.TexCoord, 2, BufferUtils.createFloatBuffer(texCoord));
mesh.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
内容来源于网络,如有侵权,请联系作者删除!