CustomModelUtil.java 文件源码

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

项目:CrystalMod 作者:
private void storeVertexData(int[] faceData, int storeIndex, int vertexIndex, Vector3f position, int shadeColor, TextureAtlasSprite sprite, BlockFaceUV faceUV)
{
    int i = storeIndex * 7;
    faceData[i] = Float.floatToRawIntBits(position.x);
    faceData[i + 1] = Float.floatToRawIntBits(position.y);
    faceData[i + 2] = Float.floatToRawIntBits(position.z);
    faceData[i + 3] = shadeColor;
    faceData[i + 4] = Float.floatToRawIntBits(sprite.getInterpolatedU(faceUV.getVertexU(vertexIndex) * .999 + faceUV.getVertexU((vertexIndex + 2) % 4) * .001));
    faceData[i + 4 + 1] = Float.floatToRawIntBits(sprite.getInterpolatedV(faceUV.getVertexV(vertexIndex) * .999 + faceUV.getVertexV((vertexIndex + 2) % 4) * .001));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号