public void init() {
final int numVertices = this.vertexResolution * vertexResolution;
final int numIndices = (this.vertexResolution - 1) * (vertexResolution - 1) * 6;
mesh = new Mesh(true, numVertices, numIndices, attribs);
this.vertices = new float[numVertices * stride];
mesh.setIndices(buildIndices());
buildVertices();
mesh.setVertices(vertices);
MeshPart meshPart = new MeshPart(null, mesh, 0, numIndices, GL20.GL_TRIANGLES);
meshPart.update();
ModelBuilder mb = new ModelBuilder();
mb.begin();
mb.part(meshPart, material);
model = mb.end();
modelInstance = new ModelInstance(model);
modelInstance.transform = transform;
}
Terrain.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:Mundus
作者:
评论列表
文章目录