Package crazypants.render

Examples of crazypants.render.BoundingBox.translate()



    //lower 1/3
    bb = BoundingBox.UNIT_CUBE;
    bb = bb.scale(scx, 0.21, scz);
    bb = bb.translate(0, -0.26f, 0);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt, null ,world != null);

    //top / bottom connectors
    bb = BoundingBox.UNIT_CUBE.scale(0.35, 1, 0.35);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt, null ,world != null);
View Full Code Here


    scz = scaleX ? 1 : size;
    bb = bb.scale(scx, 1, scz);

    float tx = scaleX ? 0.5f: 0;
    float tz = scaleX ? 0 : 0.5f;
    bb = bb.translate(tx, 0, tz);

    IIcon tex;
    if(Config.combustionGeneratorUseOpaqueModel) {
      tex = EnderIO.blockCombustionGenerator.getIcon(4,0);
    } else {
View Full Code Here

    } else {
      tex = EnderIO.blockFusedQuartz.getDefaultFrameIcon(0);
    }
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt, tex, world != null);

    bb = bb.translate(-tx * 2, 0, -tz * 2);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt,tex, world != null);

    if(gen != null) {
      ccr.renderBlock(world, block, x, y, z, overlayRenderer);
    }
View Full Code Here

      bb = bb.scale(1, 0.85 * fullness, 1);
      float ty = -(0.85f - (bb.maxY - bb.minY)) / 2;     
     
     
      Vector3d offset = ForgeDirectionOffsets.offsetScaled(ForgeDirection.values()[gen.facing], -0.075);
      bb = bb.translate((float)offset.x, ty, (float)offset.z);
     
      int brightness;
      if(gen.getWorldObj() == null) {
        brightness = 15 << 20 | 15 << 4;
      } else {
View Full Code Here

    float fudge = 1f;

    //-x side
    BoundingBox bb = BoundingBox.UNIT_CUBE.scale(0.334, fudge,fudge);
    bb = bb.translate(0.5f - (0.334f/2),0,0);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, xform, world != null);

    bb = BoundingBox.UNIT_CUBE.scale(0.334, fudge,fudge);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, xform, world != null);
View Full Code Here

    bb = BoundingBox.UNIT_CUBE.scale(0.334, fudge,fudge);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, xform, world != null);

    bb = BoundingBox.UNIT_CUBE.scale(0.334, fudge,fudge);
    bb = bb.translate(-0.5f + (0.334f/2),0,0);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, xform, world != null);

    if(vat != null) {
      ccr.renderBlock(world, block, x, y, z, overlayRenderer);
    }
View Full Code Here

    scz = scaleX ? 1 : 0.7f;

    //top 1/3
    bb = BoundingBox.UNIT_CUBE;
    bb = bb.scale(scx, 0.21, scz);
    bb = bb.translate(0, 0.26f, 0);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt, null ,world != null);


    //lower 1/3
    bb = BoundingBox.UNIT_CUBE;
View Full Code Here

      float fullness = tank.getFilledRatio();
      y += 0.01f; // prevent bottom side z-fighting
      float scale = 0.98f;
      float yScale = 0.98f * fullness;
      BoundingBox bb = BoundingBox.UNIT_CUBE.scale(scale, yScale , scale);
      bb = bb.translate(0, -(1 - yScale)/2, 0);

      GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
      GL11.glEnable(GL11.GL_CULL_FACE);
      GL11.glDisable(GL11.GL_LIGHTING);
      GL11.glEnable(GL11.GL_BLEND);
View Full Code Here

        Offset offset = conduit.getBundle().getOffset(IPowerConduit.class, component.dir);
        BoundingBox bound = component.bound;
        if(conMode != ConnectionMode.IN_OUT) {
          Vector3d trans = ForgeDirectionOffsets.offsetScaled(component.dir, -0.075);
          bound = bound.translate(trans);
        }
        CubeRenderer.render(bound, tex);
        tessellator.setColorOpaque(255, 255, 255);
      }
    } else {
View Full Code Here

    //float DEPTH = 0.05f;
    float halfDepth = 0.025f;
    float distance = Math.max(0.25f, conduitScale * 0.3f);

    BoundingBox bb = new BoundingBox(0.5 - halfWidth, 0.5 - halfHeight, 0.5 - halfDepth, 0.5 + halfWidth, 0.5 + halfHeight, 0.5 + halfDepth);
    switchBounds = bb.translate(0, 0, distance);

    float connectorHalfWidth = (float) Math.max(0.015, conduitScale * 0.05);
    connectorBounds = new BoundingBox(0.5 - connectorHalfWidth, 0.5 - connectorHalfWidth, 0.5 - connectorHalfWidth, 0.5 + connectorHalfWidth,
        0.5 + connectorHalfWidth, 0.5 + distance);

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.