Skip to content

raisim::HeightMapResource ​

final class · #include <raisim/object/terrain/HeightMap.hpp>

Immutable height samples and prepared collision tiles, reusable across worlds.

Static member functions ​

load static ​

cpp
static HeightMapResource load(
    const std::string &fileName,
    double centerX,
    double centerY)

Load a RaiSim text heightmap.

loadPng static ​

cpp
static HeightMapResource loadPng(
    const std::string &fileName,
    double centerX,
    double centerY,
    double xSize,
    double ySize,
    double heightScale,
    double heightOffset)

Load a PNG heightmap. Extents and height conversion are in meters.

fromSamples static ​

cpp
static HeightMapResource fromSamples(
    size_t xSamples,
    size_t ySamples,
    double xSize,
    double ySize,
    double centerX,
    double centerY,
    const std::vector<double> &heights)

Copy a grid of heights in row-major order, with x varying fastest.

generate static ​

cpp
static HeightMapResource generate(
    double centerX,
    double centerY,
    const TerrainProperties &properties)

Generate a heightmap using the supplied terrain properties.

RaiSim — physics for robotics and AI.