UnweightedMeshSpawnShapeValue.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:libgdxcn 作者:
@Override
public void setMesh(Mesh mesh, Model model){
    super.setMesh(mesh, model);
    vertexSize = mesh.getVertexSize()/4;
    positionOffset = mesh.getVertexAttribute(Usage.Position).offset/4;
    int indicesCount = mesh.getNumIndices();
    if(indicesCount >0){
        indices = new short[indicesCount];
        mesh.getIndices(indices);
        triangleCount = indices.length/3;
    }
    else indices = null;
    vertexCount = mesh.getNumVertices();
    vertices = new float[ vertexCount* vertexSize];
    mesh.getVertices(vertices);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号