unilab.terrains.terrain_generator.GeneratedTerrain
-
class unilab.terrains.terrain_generator.GeneratedTerrain[source]
Bases: object
Merged terrain heightfield ready to be exported as a single PNG asset.
- Parameters:
-
Methods
Attributes
-
heights_yx:
ndarray
rows=y, cols=x.
- Type:
World-space surface heights in image convention
-
horizontal_scale:
float
-
z_min:
float
-
z_max:
float
-
base_thickness:
float
-
terrain_origins:
ndarray
-
property size: tuple[float, float]
-
property height_extent: float
-
property hfield_size: tuple[float, float, float, float]
-
property geom_pos: tuple[float, float, float]
-
to_uint16()[source]
- Return type:
ndarray
-
surface_sampler()[source]
- Return type:
HeightfieldSurfaceSampler
-
write_png(path)[source]
Write the merged hfield as a 16-bit grayscale PNG.
- Parameters:
path (Path)
- Return type:
None
-
hfield_size_xml()[source]
- Return type:
str
-
geom_pos_xml()[source]
- Return type:
str
-
__init__(heights_yx, horizontal_scale, z_min, z_max, base_thickness, terrain_origins)
- Parameters:
-