Package org.osm2world.core.target.common.material

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


     
      /* render green surface */
     
      String surfaceValue = area.getTags().getValue("surface");
     
      Material material = Materials.GRASS;
     
      if (surfaceValue != null && !"grass".equals(surfaceValue)) {
        material = Materials.getSurfaceMaterial(surfaceValue, material);
      }

View Full Code Here


      }
                 
      List<VectorXYZ> vs = createTriangleStripBetween(
          upperHoleRing, lowerHoleRing);
     
      Material groundMaterial = Materials.EARTH.makeSmooth();
     
      target.drawTriangleStrip(groundMaterial, vs,
          texCoordLists(vs, groundMaterial, STRIP_WALL));
     
      target.drawConvexPolygon(groundMaterial, lowerHoleRing,
View Full Code Here

    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

   
    @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

    }

    @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

     
      /* draw ground */

      List<VectorXYZ> vectors = getOutlinePolygon().getVertexLoop();

      Material material = Materials.RAIL_BALLAST_DEFAULT;
     
      target.drawConvexPolygon(material, vectors,
          texCoordLists(vectors, material, GLOBAL_X_Z));

      /* draw connection between each pair of rails */
 
View Full Code Here

    if (useBillboards) {
     
      //"random" decision based on x coord
      boolean mirrored = (long)(pos.getX()) % 2 == 0;
     
      Material material = fruit
          ? Materials.TREE_BILLBOARD_BROAD_LEAVED_FRUIT
          : coniferous
          ? Materials.TREE_BILLBOARD_CONIFEROUS
          : Materials.TREE_BILLBOARD_BROAD_LEAVED;
     
View Full Code Here

   * If the node has an explicit surface tag, this is evaluated.
   * Otherwise, the result depends on the surface values of adjacent roads.
   */
  private static Material getSurfaceForNode(MapNode node) {
   
    Material surface = getSurfaceMaterial(
        node.getTags().getValue("surface"), null);
   
    if (surface == null) {
     
      /* choose the surface of any adjacent road */
 
View Full Code Here

  }
 
  private static Material getSurfaceForRoad(TagGroup tags,
      Material defaultSurface) {

    Material result;
   
    if (tags.containsKey("tracktype")) {
      if (tags.contains("tracktype", "grade1")) {
        result = ASPHALT;
      } else if (tags.contains("tracktype", "grade2")) {
View Full Code Here

  }
 
  private static Material getSurfaceMiddleForRoad(TagGroup tags,
      Material defaultSurface) {

    Material result;
   
    if (tags.contains("tracktype", "grade4")
        || tags.contains("tracktype", "grade5")) {
      result = TERRAIN_DEFAULT;
      // ideally, this would be the terrain type surrounds the track...
View Full Code Here

TOP

Related Classes of org.osm2world.core.target.common.material.Material

Copyright © 2018 www.massapicom. 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.