unilab.terrains.terrain_generator.TerrainHeightField

class unilab.terrains.terrain_generator.TerrainHeightField[source]

Bases: object

Backend-agnostic heightfield data for one sub-terrain patch.

Parameters:

Methods

__init__(noise, size, horizontal_scale, ...)

normalized_elevation()

Return normalized hfield values in [0, 1].

physical_heights_xy()

Return world-space surface heights as an (x, y) matrix.

Attributes

noise

Quantized height units before normalization.

size

Patch size as (x, y) in meters.

horizontal_scale

vertical_scale

elevation_min

elevation_max

max_physical_height

base_thickness

z_offset

noise: ndarray

Quantized height units before normalization.

size: tuple[float, float]

Patch size as (x, y) in meters.

horizontal_scale: float
vertical_scale: float
elevation_min: int
elevation_max: int
max_physical_height: float
base_thickness: float
z_offset: float
physical_heights_xy()[source]

Return world-space surface heights as an (x, y) matrix.

Return type:

ndarray

normalized_elevation()[source]

Return normalized hfield values in [0, 1].

Return type:

ndarray

__init__(noise, size, horizontal_scale, vertical_scale, elevation_min, elevation_max, max_physical_height, base_thickness, z_offset)
Parameters: