Examples of RenderInfo


Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);


    bindTexture(TextureMap.locationBlocksTexture);

    RenderInfo renderBox = new RenderInfo();
    renderBox.texture = BuildCraftTransport.instance.wireIconProvider.getIcon(bcRenderState.wireMatrix.getWireIconIndex(color));

    // Z render

    if (minZ != LPConstants.PIPE_MIN_POS || maxZ != LPConstants.PIPE_MAX_POS || !found) {
      renderBox.setBounds(cx == LPConstants.PIPE_MIN_POS ? cx - 0.05F : cx, cy == LPConstants.PIPE_MIN_POS ? cy - 0.05F : cy, minZ, cx == LPConstants.PIPE_MIN_POS ? cx
          : cx + 0.05F, cy == LPConstants.PIPE_MIN_POS ? cy : cy + 0.05F, maxZ);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    // X render

    if (minX != LPConstants.PIPE_MIN_POS || maxX != LPConstants.PIPE_MAX_POS || !found) {
      renderBox.setBounds(minX, cy == LPConstants.PIPE_MIN_POS ? cy - 0.05F : cy, cz == LPConstants.PIPE_MIN_POS ? cz - 0.05F : cz, maxX, cy == LPConstants.PIPE_MIN_POS ? cy
          : cy + 0.05F, cz == LPConstants.PIPE_MIN_POS ? cz : cz + 0.05F);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    // Y render

    if (minY != LPConstants.PIPE_MIN_POS || maxY != LPConstants.PIPE_MAX_POS || !found) {
      renderBox.setBounds(cx == LPConstants.PIPE_MIN_POS ? cx - 0.05F : cx, minY, cz == LPConstants.PIPE_MIN_POS ? cz - 0.05F : cz, cx == LPConstants.PIPE_MIN_POS ? cx
          : cx + 0.05F, maxY, cz == LPConstants.PIPE_MIN_POS ? cz : cz + 0.05F);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    if (center || !found) {
      renderBox.setBounds(cx == LPConstants.PIPE_MIN_POS ? cx - 0.05F : cx, cy == LPConstants.PIPE_MIN_POS ? cy - 0.05F : cy, cz == LPConstants.PIPE_MIN_POS ? cz - 0.05F : cz,
          cx == LPConstants.PIPE_MIN_POS ? cx : cx + 0.05F, cy == LPConstants.PIPE_MIN_POS ? cy : cy + 0.05F, cz == LPConstants.PIPE_MIN_POS ? cz : cz + 0.05F);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    RenderHelper.enableStandardItemLighting();
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

    GL11.glPopAttrib();
    GL11.glPopMatrix();
  }

  private void renderGate(LogisticsTileGenericPipe tile, IIcon icon, int layer, float trim, float translateCenter, float extraDepth, ForgeDirection direction) {
    RenderInfo renderBox = new RenderInfo();
    renderBox.texture = icon;

    float[][] zeroState = new float[3][2];
    float min = LPConstants.PIPE_MIN_POS + trim / 2F;
    float max = LPConstants.PIPE_MAX_POS - trim / 2F;

    // X START - END
    zeroState[0][0] = min;
    zeroState[0][1] = max;
    // Y START - END
    zeroState[1][0] = LPConstants.PIPE_MIN_POS - 0.10F - 0.001F * layer;
    zeroState[1][1] = LPConstants.PIPE_MIN_POS + 0.001F + 0.01F * layer + extraDepth;
    // Z START - END
    zeroState[2][0] = min;
    zeroState[2][1] = max;
    GL11.glPushMatrix();

    float xt = direction.offsetX * translateCenter, yt = direction.offsetY * translateCenter, zt = direction.offsetZ * translateCenter;

    GL11.glTranslatef(xt, yt, zt);

    float[][] rotated = MatrixTranformations.deepClone(zeroState);
    MatrixTranformations.transform(rotated, direction);

    if (layer != 0) {
      renderBox.setRenderSingleSide(direction.ordinal());
    }

    renderBox.setBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
    RenderEntityBlock.INSTANCE.renderBlock(renderBox, tile.getWorldObj(), 0, 0, 0, tile.xCoord, tile.yCoord, tile.zCoord, true, true);
    GL11.glPopMatrix();
  }
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

    }

    DisplayFluidList d = new DisplayFluidList();
    displayFluidLists.put(liquidId, d);

    RenderInfo block = new RenderInfo();

    Fluid fluid = FluidRegistry.getFluid(liquidId);
    if (fluid.getBlock() != null) {
      block.baseBlock = fluid.getBlock();
    } else {
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

      return;
    }

    initialized = true;

    RenderInfo block = new RenderInfo();
    block.texture = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.Power_Normal.ordinal());

    float size = CoreConstants.PIPE_MAX_POS - CoreConstants.PIPE_MIN_POS;

    for (int s = 0; s < POWER_STAGES; ++s) {
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);


    bindTexture(TextureMap.locationBlocksTexture);

    RenderInfo renderBox = new RenderInfo();
    renderBox.texture = BuildCraftTransport.instance.wireIconProvider.getIcon(state.wireMatrix.getWireIconIndex(color));

    // Z render

    if (minZ != CoreConstants.PIPE_MIN_POS || maxZ != CoreConstants.PIPE_MAX_POS || !found) {
      renderBox.setBounds(cx == CoreConstants.PIPE_MIN_POS ? cx - 0.05F : cx, cy == CoreConstants.PIPE_MIN_POS ? cy - 0.05F : cy, minZ, cx == CoreConstants.PIPE_MIN_POS ? cx
          : cx + 0.05F, cy == CoreConstants.PIPE_MIN_POS ? cy : cy + 0.05F, maxZ);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    // X render

    if (minX != CoreConstants.PIPE_MIN_POS || maxX != CoreConstants.PIPE_MAX_POS || !found) {
      renderBox.setBounds(minX, cy == CoreConstants.PIPE_MIN_POS ? cy - 0.05F : cy, cz == CoreConstants.PIPE_MIN_POS ? cz - 0.05F : cz, maxX, cy == CoreConstants.PIPE_MIN_POS ? cy
          : cy + 0.05F, cz == CoreConstants.PIPE_MIN_POS ? cz : cz + 0.05F);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    // Y render

    if (minY != CoreConstants.PIPE_MIN_POS || maxY != CoreConstants.PIPE_MAX_POS || !found) {
      renderBox.setBounds(cx == CoreConstants.PIPE_MIN_POS ? cx - 0.05F : cx, minY, cz == CoreConstants.PIPE_MIN_POS ? cz - 0.05F : cz, cx == CoreConstants.PIPE_MIN_POS ? cx
          : cx + 0.05F, maxY, cz == CoreConstants.PIPE_MIN_POS ? cz : cz + 0.05F);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    if (center || !found) {
      renderBox.setBounds(cx == CoreConstants.PIPE_MIN_POS ? cx - 0.05F : cx, cy == CoreConstants.PIPE_MIN_POS ? cy - 0.05F : cy, cz == CoreConstants.PIPE_MIN_POS ? cz - 0.05F : cz,
          cx == CoreConstants.PIPE_MIN_POS ? cx : cx + 0.05F, cy == CoreConstants.PIPE_MIN_POS ? cy : cy + 0.05F, cz == CoreConstants.PIPE_MIN_POS ? cz : cz + 0.05F);
      RenderEntityBlock.INSTANCE.renderBlock(renderBox, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true);
    }

    RenderHelper.enableStandardItemLighting();
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

  }

  private void renderGate(TileGenericPipe tile, IIcon icon, int layer, float trim, float translateCenter, float extraDepth, ForgeDirection direction) {
    PipeRenderState state = tile.renderState;

    RenderInfo renderBox = new RenderInfo();
    renderBox.texture = icon;

    float[][] zeroState = new float[3][2];
    float min = CoreConstants.PIPE_MIN_POS + trim / 2F;
    float max = CoreConstants.PIPE_MAX_POS - trim / 2F;

    // X START - END
    zeroState[0][0] = min;
    zeroState[0][1] = max;
    // Y START - END
    zeroState[1][0] = CoreConstants.PIPE_MIN_POS - 0.10F - 0.001F * layer;
    zeroState[1][1] = CoreConstants.PIPE_MIN_POS + 0.001F + 0.01F * layer + extraDepth;
    // Z START - END
    zeroState[2][0] = min;
    zeroState[2][1] = max;

    GL11.glPushMatrix();

    float xt = direction.offsetX * translateCenter, yt = direction.offsetY * translateCenter, zt = direction.offsetZ
        * translateCenter;

    GL11.glTranslatef(xt, yt, zt);

    float[][] rotated = MatrixTranformations.deepClone(zeroState);
    MatrixTranformations.transform(rotated, direction);

    if (layer != 0) {
      renderBox.setRenderSingleSide(direction.ordinal());
    }

    renderBox.setBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
    RenderEntityBlock.INSTANCE.renderBlock(renderBox, tile.getWorldObj(), 0, 0, 0, tile.xCoord, tile.yCoord,
        tile.zCoord, true, true);
    GL11.glPopMatrix();
  }
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

    dummyEntityItem.setEntityItemStack(itemstack);
    customRenderItem.doRender(dummyEntityItem, 0, 0, 0, 0, 0);

    if (color != null) {
      bindTexture(TextureMap.locationBlocksTexture);
      RenderInfo block = new RenderInfo();

      block.texture = PipeIconProvider.TYPE.ItemBox.getIcon();

      float pix = 0.0625F;
View Full Code Here

Examples of buildcraft.core.render.RenderEntityBlock.RenderInfo

      for (int size = 0; size < 100; ++size) {
        for (int i = 0; i < 20; ++i) {
          scaledBoxes[size][i] = GLAllocation.generateDisplayLists(1);
          GL11.glNewList(scaledBoxes[size][i], GL11.GL_COMPILE);

          RenderInfo block = new RenderInfo();

          float minSize = 0.2F * size / 100F;
          float maxSize = 0.4F * size / 100F;
          //float minSize = 0.1F;
          //float maxSize = 0.2F;
View Full Code Here

Examples of logisticspipes.renderer.CustomBlockRenderer.RenderInfo

    if(displayFluidLists.containsKey(liquidId)) { return displayFluidLists.get(liquidId); }
   
    DisplayFluidList d = new DisplayFluidList();
    displayFluidLists.put(liquidId, d);
   
    RenderInfo block = new RenderInfo();
   
    Fluid fluid = FluidRegistry.getFluid(liquidId);
    block.baseBlock = fluid.getBlock();
    block.texture = fluid.getStillIcon();
   
View Full Code Here

Examples of org.jwildfire.create.tina.render.RenderInfo

      flame = pFlame;
      preview = pPreview;
    }

    private void generatePreview(int pQuality) {
      RenderInfo info = new RenderInfo(IMG_WIDTH, IMG_HEIGHT, RenderMode.PREVIEW);
      Flame renderFlame = flame.makeCopy();
      double wScl = (double) info.getImageWidth() / (double) renderFlame.getWidth();
      double hScl = (double) info.getImageHeight() / (double) renderFlame.getHeight();
      renderFlame.setPixelsPerUnit((wScl + hScl) * 0.5 * renderFlame.getPixelsPerUnit());
      renderFlame.setWidth(IMG_WIDTH);
      renderFlame.setHeight(IMG_HEIGHT);
      renderFlame.setSampleDensity(prefs.getTinaRenderPreviewQuality());
      renderFlame.setSpatialFilterRadius(0.0);
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.