Package org.oscim.layers.tile.buildings
Class S3DBUtils
java.lang.Object
org.oscim.layers.tile.buildings.S3DBUtils
Provides utils for S3DB layers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancalcCircleMesh(GeometryBuffer element, float minHeight, float maxHeight, String roofShape) Calculates a circle mesh of a Poly-GeometryBuffer.static booleancalcFlatMesh(GeometryBuffer element, float maxHeight) Calculates a flat mesh of a Poly-GeometryBuffer.static booleancalcOutlines(GeometryBuffer element, float minHeight, float maxHeight) Calculates a mesh for the outlines of a Poly-GeometryBuffer.static booleancalcPyramidalMesh(GeometryBuffer element, float minHeight, float maxHeight) Calculates a pyramidal mesh of a Poly-GeometryBuffer.static booleancalcRidgeMesh(GeometryBuffer element, float minHeight, float maxHeight, boolean orientationAcross, String roofShape, GeometryBuffer specialParts) Calculates a ridge mesh of a Poly-GeometryBuffer.static booleancalcSkillionMesh(GeometryBuffer element, float minHeight, float maxHeight, float roofDegree, GeometryBuffer specialParts) Calculates a skillion mesh of a Poly-GeometryBuffer.static intstatic intgetMaterialColor(String material, Color.HSV hsv, boolean relative) static float[][]getProfile(String roofShape) Get the profile (half cross section) of roof shape.
-
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
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
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
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 meshminHeight- the minimum heightmaxHeight- the maximum heightorientationAcross- indicates if ridge is parallel to short sideroofShape- the roof shapespecialParts- 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 meshroofDegree- the direction of slopespecialParts- the GeometryBuffer which is used to write the additional building parts- Returns:
- true if calculation succeeded, false otherwise
-
getColor
- Parameters:
color- the color as string (see http://wiki.openstreetmap.org/wiki/Key:colour)hsv- the HSV color values to modify given colorrelative- declare if colors are modified relative to their values- Returns:
- the color as integer (8 bit each a, r, g, b)
-
getMaterialColor
- 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
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!)
-