Examples of ImmutableMaterial


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

      /* draw flag */
     
      target.drawColumn(Materials.PLASTIC_GREY.makeSmooth(), null,
          pos.xyz(holeBottomEle), 1.5, 0.007, 0.007, false, true);
     
      ImmutableMaterial flagcloth = new ImmutableMaterial(Lighting.SMOOTH, Color.YELLOW);
     
      List<VectorXYZ> flagVertices = asList(
          new VectorXYZ(pos.x, 1.5, pos.z),
          new VectorXYZ(pos.x, 1.2, pos.z),
          new VectorXYZ(pos.x + 0.4, 1.5, pos.z),
View Full Code Here

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

    }
   
    private void drawContainer(Target<?> target, String trash, VectorXYZ pos){
     
      if ("clothes".equals(trash)) {
        target.drawBox(new ImmutableMaterial(Lighting.FLAT, new Color(0.82f, 0.784f, 0.75f)),
            pos,
            faceVector, 2, 1, 1);
      } else { // "paper" || "white_glass" || "coloured_glass"
        float width = 1.5f;
        float height = 1.6f;
       
        Material colourFront = null;
        Material colourBack = null;
       
        if ("paper".equals(trash)) {
          colourFront = new ImmutableMaterial(Lighting.FLAT, Color.BLUE);
          colourBack = new ImmutableMaterial(Lighting.FLAT, Color.BLUE);
        } else if ("white_glass".equals(trash)) {
          colourFront = new ImmutableMaterial(Lighting.FLAT, Color.WHITE);
          colourBack = new ImmutableMaterial(Lighting.FLAT, Color.WHITE);
        } else { // "coloured_glass"
          colourFront = new ImmutableMaterial(Lighting.FLAT, new Color(0.18f, 0.32f, 0.14f));
          colourBack = new ImmutableMaterial(Lighting.FLAT, new Color(0.39f, 0.15f, 0.11f));
        }
     
        target.drawBox(STEEL,
            pos,
            faceVector, height, width, width);
View Full Code Here

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

      Material machineMaterial = null;
      Material poleMaterial = STEEL;
      Type type = null;
     
      if (node.getTags().contains("vending", "bicycle_tube") && node.getTags().containsAny("operator", asList("Continental", "continental"))){
        machineMaterial = new ImmutableMaterial(Lighting.FLAT, Color.ORANGE );
      } else if(node.getTags().contains("vending", "bicycle_tube")){
        machineMaterial = new ImmutableMaterial(Lighting.FLAT, Color.BLUE );
      } else if(node.getTags().contains("vending", "cigarettes")){
        machineMaterial = new ImmutableMaterial(Lighting.FLAT, new Color(0.8f, 0.73f, 0.5f));
      } else if(node.getTags().contains("vending", "condoms")){
        machineMaterial = new ImmutableMaterial(Lighting.FLAT, new Color(0.39f, 0.15f, 0.11f) );
      }
     
      // get Type of vending machine
      if(isInWall(node)){
        type = Type.WALL;
View Full Code Here

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

      Collection<TriangleXZ> triangles =
        TriangulationUtil.triangulate(area.getPolygon());
     
      for (TriangleXZ t : triangles) {
        target.drawTriangles(
            new ImmutableMaterial(Lighting.FLAT, AREA_COLOR),
            Collections.singleton(t.xyz(-0.1)),
            null);
      }
     
    }
View Full Code Here

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

      endDirXZ = endDirXZ.normalize();
    }
    VectorXZ endNormalXZ = endDirXZ.rightNormal();
   
   
    ImmutableMaterial colorMaterial =
        new ImmutableMaterial(Lighting.FLAT, color);
   
    target.drawTriangleStrip(colorMaterial, asList(
        lastV,
        headStart.subtract(endDirXZ.mult(headLength/2)),
        headStart.add(endDirXZ.mult(headLength/2))),
View Full Code Here

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

        } else {
          color = parseColor(colorString);
        }
       
        if (color != null) {
          material = new ImmutableMaterial(
              material.getLighting(), color,
              material.getAmbientFactor(),
              material.getDiffuseFactor(),
              material.getTransparency(),
              material.getTextureDataList());
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.