Examples of Translation


Examples of buildcraft.api.blueprints.Translation

          / (float) blockScanner.totalBlocks();

      if (blockScanner.blocksLeft() == 0) {
        writingBlueprint.readEntitiesFromWorld(writingContext, architect);

        Translation transform = new Translation();

        transform.x = -writingContext.surroundingBox().pMin().x;
        transform.y = -writingContext.surroundingBox().pMin().y;
        transform.z = -writingContext.surroundingBox().pMin().z;
View Full Code Here

Examples of buildcraft.api.blueprints.Translation

        rotateLeft(context);
        rotateLeft(context);
      }
    }

    Translation transform = new Translation();

    transform.x = x - anchorX;
    transform.y = y - anchorY;
    transform.z = z - anchorZ;
View Full Code Here

Examples of codechicken.lib.vec.Translation

    CCRenderState.hasColour = true;

    Colour colour = new ColourRGBA(panel.colour.getColor(0), panel.colour.getColor(1), panel.colour.getColor(2), 1);
    int side = panel.side.ordinal();
   
    frameModels[side].render(new Translation(panel.x(), panel.y(), panel.z()), new IconTransformation(icon));
    lightModels[side].render(new Translation(panel.x(), panel.y(), panel.z()), new IconTransformation(icon), new ColourMultiplier(colour.rgba()));
  }
View Full Code Here

Examples of codechicken.lib.vec.Translation

    small_models = CCModel.parseObjModels(MekanismUtils.getResource(ResourceType.MODEL, "transmitter_small.obj"), 7, null);

    for(Map.Entry<String, CCModel> e : small_models.entrySet())
    {
      e.setValue(e.getValue().twoFacedCopy().apply(new Translation(Vector3.center)).shrinkUVs(0.0005));
      e.getValue().computeLighting(LightModel.standardLightModel);
    }

    large_models = CCModel.parseObjModels(MekanismUtils.getResource(ResourceType.MODEL, "transmitter_large.obj"), 7, null);

    for(Map.Entry<String, CCModel> e : large_models.entrySet())
    {
      e.setValue(e.getValue().twoFacedCopy().apply(new Translation(Vector3.center)).shrinkUVs(0.0005));
      e.getValue().computeLighting(LightModel.standardLightModel);
    }

    contents_models = CCModel.parseObjModels(MekanismUtils.getResource(ResourceType.MODEL, "transmitter_contents.obj"), 7, null);
    LightModel interiorLightModel = new LightModel()
        .setAmbient(new Vector3(0.6, 0.6, 0.6))
        .addLight(new Light(new Vector3(0.3, 1, -0.7))
            .setDiffuse(new Vector3(0.6, 0.6, 0.6)))
        .addLight(new Light(new Vector3(-0.3, 1, 0.7))
            .setDiffuse(new Vector3(0.6, 0.6, 0.6)));

    for(CCModel c : contents_models.values())
    {
      c.apply(new Translation(Vector3.center));
      c.computeLighting(interiorLightModel);
      c.shrinkUVs(0.0005);
    }
  }
View Full Code Here

Examples of codechicken.lib.vec.Translation

  public void renderPart(IIcon icon, CCModel cc, double x, double y, double z, Colour color)
  {
    if(color != null)
    {
      cc.render(new Translation(x, y, z), new IconTransformation(icon), new ColourMultiplier(color.rgba()));
    }
    else {
      cc.render(new Translation(x, y, z), new IconTransformation(icon));
    }
  }
View Full Code Here

Examples of cofh.repack.codechicken.lib.vec.Translation

    public static QBQuad restore(Rectangle4i flat, int side, double d, QBImage img) {

      QBQuad quad = new QBQuad(side);
      quad.image = img;

      Transformation t = new Scale(-1, 1, -1).with(Rotation.sideOrientation(side, 0)).with(new Translation(new Vector3().setSide(side, d)));
      quad.verts[0] = new Vertex5(flat.x, 0, flat.y, 0, 0);
      quad.verts[1] = new Vertex5(flat.x + flat.w, 0, flat.y, 1, 0);
      quad.verts[2] = new Vertex5(flat.x + flat.w, 0, flat.y + flat.h, 1, 1);
      quad.verts[3] = new Vertex5(flat.x, 0, flat.y + flat.h, 0, 1);
      for (Vertex5 vert : quad.verts) {
View Full Code Here

Examples of cofh.repack.codechicken.lib.vec.Translation

        m.verts[i++] = quad.verts[1];
        m.verts[i++] = quad.verts[2];
        m.verts[i++] = quad.verts[3];
      }
      m.apply(new UVScale(1D / img.getWidth(), 1D / img.getHeight()));
      m.apply(new Translation(pos.x, pos.y, pos.z));
      if (scaleMC) {
        m.apply(new Scale(1 / 16D));
      }
      m.computeNormals();
      return m;
View Full Code Here

Examples of com.codiform.moo.annotation.Translation

  private Object getValue(Object source, String expression) {
    return MVEL.eval(expression, source);
  }

  private String getTranslationExpression(Field item) {
    Translation translation = item.getAnnotation(Translation.class);
    if (translation == null || translation.value() == null)
      return item.getName();
    else
      return translation.value();
  }
View Full Code Here

Examples of com.codiform.moo.annotation.Translation

  public String getName() {
    return name;
  }

  public String getTranslationExpression() {
    Translation translationAnnotation = getAnnotation(Translation.class);
    if (translationAnnotation != null) {
      return translationAnnotation.value();
    } else {
      return name;
    }
  }
View Full Code Here

Examples of com.codiform.moo.annotation.Translation

  public String getName() {
    return field.getName();
  }

  public String getTranslationExpression() {
    Translation translationAnnotation = getAnnotation(Translation.class);
    if (translationAnnotation != null) {
      return translationAnnotation.value();
    } else {
      return field.getName();
    }
  }
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.