RenderParticle.java 文件源码

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

项目:Translocators 作者:
public static void render(double x, double y, double z, Colour colour, double s, double u1, double v1, double u2, double v2) {
    x -= Particle.interpPosX;
    y -= Particle.interpPosY;
    z -= Particle.interpPosZ;

    float par3 = ActiveRenderInfo.getRotationX();
    float par4 = ActiveRenderInfo.getRotationXZ();
    float par5 = ActiveRenderInfo.getRotationZ();
    float par6 = ActiveRenderInfo.getRotationYZ();
    float par7 = ActiveRenderInfo.getRotationXY();

    VertexBuffer b = Tessellator.getInstance().getBuffer();
    b.pos((x - par3 * s - par6 * s), (y - par4 * s), (z - par5 * s - par7 * s)).tex(u2, v2).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
    b.pos((x - par3 * s + par6 * s), (y + par4 * s), (z - par5 * s + par7 * s)).tex(u2, v1).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
    b.pos((x + par3 * s + par6 * s), (y + par4 * s), (z + par5 * s + par7 * s)).tex(u1, v1).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
    b.pos((x + par3 * s - par6 * s), (y - par4 * s), (z + par5 * s - par7 * s)).tex(u1, v2).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号