/** * 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)); }
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); } }
lods[i].setupData(Usage.Dynamic, 1, Format.UnsignedInt, BufferUtils.createIntBuffer(lodData[i])); outMesh.setLodLevels(lods);
/** * 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)); }
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); } }
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); } }
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); } }
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));
lods[i].setupData(Usage.Dynamic, 1, Format.UnsignedInt, BufferUtils.createIntBuffer(lodData[i])); outMesh.setLodLevels(lods);
outMesh.setLodLevels(lods);
mesh.setLodLevels(lodLevels); mesh.setBuffer(Type.TexCoord, 2, BufferUtils.createFloatBuffer(texCoord)); mesh.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));