Package crazypants.render

Examples of crazypants.render.BoundingBox.scale()


      break;
    }
    rangeSqu = range * range;

    BoundingBox bb = new BoundingBox(new BlockCoord(this));
    bb = bb.scale(range, range, range);
    attractorBounds = AxisAlignedBB.getBoundingBox(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
    capacitor = new BasicCapacitor(powerPerTick * 8, capacitorType.capacitor.getMaxEnergyStored(), powerPerTick);
  }

  @Override
View Full Code Here


      Tessellator tes = Tessellator.instance;
      tes.startDrawingQuads();

      float fullness = (float) (tank.getFluidAmount()) / (tank.getCapacity());
      BoundingBox bb = BoundingBox.UNIT_CUBE.scale(0.85, 0.96, 0.85);
      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);

View Full Code Here

    }
    rangeSqu = range * range;   
    capacitor = new BasicCapacitor(powerPerTick * 8, capacitorType.capacitor.getMaxEnergyStored(), powerPerTick);
   
    BoundingBox bb = new BoundingBox(getLocation());
    bb = bb.scale(range + 0.5f, range + 0.5f, range + 0.5f).translate(0.5f, 0.5f, 0.5f);   
    bounds = AxisAlignedBB.getBoundingBox(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
  }

  @Override
  public String getMachineName() {
View Full Code Here

    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt, null ,world != null);


    //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);
View Full Code Here

    //tanks
    float size = 0.64f;
    bb = BoundingBox.UNIT_CUBE.scale(0.98, 1, 0.98);
    scx = scaleX ? size : 1;
    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);
View Full Code Here

      Tessellator tes = Tessellator.instance;
      tes.startDrawingQuads();

      float fullness = (float) (tank.getFluidAmount()) / (tank.getCapacity());
      BoundingBox bb = BoundingBox.UNIT_CUBE.scale(0.85, 0.96, 0.85);
      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);
View Full Code Here

    float scx;
    float scz;

    //middle chunk
    bb = BoundingBox.UNIT_CUBE;
    bb = bb.scale(1, 0.34, 1);
    vt.setFacing(facing);
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, vt, null ,world != null);

    scaleX = facing != 4 && facing != 5;
    scx = scaleX ? 0.7f : 1;
View Full Code Here

    scx = scaleX ? 0.7f : 1;
    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
View Full Code Here

        } else {
          bb = bb.expandBy(cBB.bound);
        }
      }
      if(bb != null) {
        bb = bb.scale(1.05, 1.05, 1.05);
        CollidableComponent cc = new CollidableComponent(null, bb, ForgeDirection.UNKNOWN,
            ConduitConnectorType.INTERNAL);
        result.add(cc);
        cachedConnectors.add(cc);
      }
View Full Code Here

          float area = bb.getArea();
          for (CollidableComponent cc : cores) {
            bb = bb.expandBy(cc.bound);
          }
          if(bb.getArea() > area * 1.5f) {
            bb = bb.scale(1.05, 1.05, 1.05);
            CollidableComponent cc = new CollidableComponent(null, bb, ForgeDirection.UNKNOWN,
                ConduitConnectorType.INTERNAL);
            result.add(cc);
            cachedConnectors.add(cc);
          }
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.