Examples of Material


Examples of org.osm2world.core.target.common.material.Material

    private final Material material;
   
    public Fence(MapWaySegment segment, TagGroup tags) {
      super(segment, 0.5f, 0.1f);
     
      Material materialFromMap = MATERIAL_MAP.get(tags.getValue("fence_type"));
      if (materialFromMap != null) {
        material = materialFromMap;
      } else {
        material = Materials.FENCE_DEFAULT;
      }
View Full Code Here

Examples of org.osm2world.core.target.common.material.Material

   
    @Override
    public void renderTo(Target<?> target) {
     
      String surface = area.getTags().getValue("surface");
      Material material = getSurfaceMaterial(surface, ASPHALT);
     
      Collection<TriangleXYZ> triangles = getTriangulation();
     
      target.drawTriangles(material, triangles,
          triangleTexCoordLists(triangles, material, GLOBAL_X_Z));
View Full Code Here

Examples of org.osm2world.core.target.common.material.Material

    }

    @Override
    public void renderTo(Target<?> target) {
     
      Material material = null;
     
      if (surface.equals(EMPTY_SURFACE_TAG.value)) {
        material = Materials.TERRAIN_DEFAULT;
      } else {
        material = Materials.getSurfaceMaterial(surface);
View Full Code Here

Examples of org.spout.api.material.Material

public class EntityArmorInventory extends ArmorInventory {
  @Override
  public boolean canSet(int slot, ItemStack item) {
    if (item != null) {
      Material material = item.getMaterial();
      switch (slot) {
        case BOOT_SLOT:
          return material instanceof Boots;
        case LEGGINGS_SLOT:
          return material instanceof Leggings;
View Full Code Here

Examples of org.spoutcraft.api.material.Material

    output.writeShort(data);
    output.writeString(name);
  }

  public void run(int PlayerId) {
    Material material = MaterialData.getOrCreateMaterial(id, data);
    if (material == null) {
      material = MaterialData.getCustomItem(data);
    }
    if (name.equals("[resetall]")) {
      MaterialData.reset();
    }
    if (material != null) {
      if (name.equals("[reset]")) {
        material.setName(material.getNotchianName());
      } else {
        material.setName(name);
      }
    } else {
      //System.out.println("Tried to set item name to [" + name + "] for unknown material (" + id + ", " + data + ")");
    }
  }
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material

    public void renderOverlay() {

    }

    private void renderHand(float bobOffset, float handMovementAnimationOffset) {
        Material shader = Assets.getMaterial("engine:prog.block");
        shader.activateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);

        shader.enable();
        shader.setFloat("sunlight", worldRenderer.getSunlightValue(), true);
        shader.setFloat("blockLight", worldRenderer.getBlockLightValue(), true);
        glBindTexture(GL11.GL_TEXTURE_2D, handTex.getId());

        glPushMatrix();
        glTranslatef(0.8f, -0.8f + bobOffset - handMovementAnimationOffset * 0.5f, -1.0f - handMovementAnimationOffset * 0.5f);
        glRotatef(-45f - handMovementAnimationOffset * 64.0f, 1.0f, 0.0f, 0.0f);
        glRotatef(35f, 0.0f, 1.0f, 0.0f);
        glTranslatef(0f, 0.25f, 0f);
        glScalef(0.3f, 0.6f, 0.3f);

        handMesh.render();

        glPopMatrix();

        shader.deactivateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);
    }
View Full Code Here

Examples of org.xith3d.scenegraph.Material

        geom.setOptimization(Optimization.USE_DISPLAY_LISTS);
       
        terrainShape.setGeometry(geom);
       
        Appearance app = new Appearance();
        app.setMaterial(new Material());
        app.getMaterial().setDiffuseColor(new Colorf(0.6313726f, 0.28627452f, 0.07058824f));
       
        terrainShape.setAppearance(app);
       
    }
View Full Code Here

Examples of railo.runtime.img.filter.LightFilter.Material

    if(value instanceof LightFilter.Material)
      return (LightFilter.Material) value;
   
    Struct sct = Caster.toStruct(value,null);
    if(sct!=null){
      Material material = new LightFilter.Material();
      material.setDiffuseColor(toColorRGB(sct.get("color"), argName+".color"));
      material.setOpacity(Caster.toFloatValue(sct.get("opacity")));
      return material;
    }
    String str = Caster.toString(value,null);
    if(str!=null){
      String[] arr = ListUtil.listToStringArray(str, ',');
      if(arr.length==2) {
        Material material = new LightFilter.Material();
        material.setDiffuseColor(toColorRGB(arr[0], argName+"[1]"));
        material.setOpacity(Caster.toFloatValue(arr[1]));
        return material;
      }
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "use the following format [color,opacity]");
     
    }
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.