Class S3DBUtils

java.lang.Object
org.oscim.layers.tile.buildings.S3DBUtils

public final class S3DBUtils extends Object
Provides utils for S3DB layers.
  • Method Details

    • calcCircleMesh

      public static boolean calcCircleMesh(GeometryBuffer element, float minHeight, float maxHeight, String roofShape)
      Calculates a circle mesh of a Poly-GeometryBuffer.
      Parameters:
      element - the GeometryBuffer which is used to write the 3D mesh
      Returns:
      true if calculation succeeded, false otherwise
    • calcFlatMesh

      public static boolean calcFlatMesh(GeometryBuffer element, float maxHeight)
      Calculates a flat mesh of a Poly-GeometryBuffer.
      Parameters:
      element - the GeometryBuffer which is used to write the 3D mesh
      Returns:
      true if calculation succeeded, false otherwise
    • calcOutlines

      public static boolean calcOutlines(GeometryBuffer element, float minHeight, float maxHeight)
      Calculates a mesh for the outlines of a Poly-GeometryBuffer.
      Parameters:
      element - the GeometryBuffer which is used to write the 3D mesh
      Returns:
      true if calculation succeeded, false otherwise
    • calcPyramidalMesh

      public static boolean calcPyramidalMesh(GeometryBuffer element, float minHeight, float maxHeight)
      Calculates a pyramidal mesh of a Poly-GeometryBuffer.
      Parameters:
      element - the GeometryBuffer which is used to write the 3D mesh
      Returns:
      true if calculation succeeded, false otherwise
    • calcRidgeMesh

      public static boolean calcRidgeMesh(GeometryBuffer element, float minHeight, float maxHeight, boolean orientationAcross, String roofShape, GeometryBuffer specialParts)
      Calculates a ridge mesh of a Poly-GeometryBuffer.
      Parameters:
      element - the GeometryBuffer which is used to write the 3D mesh
      minHeight - the minimum height
      maxHeight - the maximum height
      orientationAcross - indicates if ridge is parallel to short side
      roofShape - the roof shape
      specialParts - element to add missing parts of underlying element
      Returns:
      true if calculation succeeded, false otherwise
    • calcSkillionMesh

      public static boolean calcSkillionMesh(GeometryBuffer element, float minHeight, float maxHeight, float roofDegree, GeometryBuffer specialParts)
      Calculates a skillion mesh of a Poly-GeometryBuffer.
      Parameters:
      element - the GeometryBuffer which is used to write the 3D mesh
      roofDegree - the direction of slope
      specialParts - the GeometryBuffer which is used to write the additional building parts
      Returns:
      true if calculation succeeded, false otherwise
    • getColor

      public static int getColor(String color, Color.HSV hsv, boolean relative)
      Parameters:
      color - the color as string (see http://wiki.openstreetmap.org/wiki/Key:colour)
      hsv - the HSV color values to modify given color
      relative - declare if colors are modified relative to their values
      Returns:
      the color as integer (8 bit each a, r, g, b)
    • getMaterialColor

      public static int getMaterialColor(String material, Color.HSV hsv, boolean relative)
      Parameters:
      material - the material as string (see http://wiki.openstreetmap.org/wiki/Key:material and following pages)
      hsv - the HSV color values to modify given material
      Returns:
      the color as integer (8 bit each a, r, g, b)
    • getProfile

      public static float[][] getProfile(String roofShape)
      Get the profile (half cross section) of roof shape. profile[i][0]: x-coordinate profile[i][1]: z-coordinate
      Parameters:
      roofShape - the roof shape value
      Returns:
      the profile (read-only!)