Skip to content

raisim::rscene::Terrain ​

struct · #include <raisim/Rscene.hpp>

A sampled height-map terrain region.

Public attributes ​

id ​

cpp
std::string id

Node id and scene node path; the path is used as the HeightMap name.

path ​

cpp
std::string path

xSamples ​

cpp
int xSamples

Number of samples along x and y (at least 2 each).

ySamples ​

cpp
int ySamples

xSize ​

cpp
double xSize

Extent along x and y (m).

ySize ​

cpp
double ySize

center ​

cpp
Vec3 center

Center of the height map; heights are relative to center.z.

material ​

cpp
std::string material

Render material id (Material::id) and physics contact material name.

contactMaterial ​

cpp
std::string contactMaterial

baseTextureSlot ​

cpp
int baseTextureSlot

Slot of the base TerrainTexture.

heights ​

cpp
std::vector<double> heights

xSamples * ySamples heights (m), relative to center.z, in World::addHeightMap() order.

texturePrimary ​

cpp
std::vector<int> texturePrimary

Per-sample paint, one entry per sample: primary and secondary texture slot, the blend between them, wetness, holes and a color multiplier. Missing maps take Engine 2's defaults (base slot, no blend, dry, solid, white).

textureSecondary ​

cpp
std::vector<int> textureSecondary

textureBlend ​

cpp
std::vector<double> textureBlend

wetness ​

cpp
std::vector<double> wetness

holes ​

cpp
std::vector<int> holes

vertexColors ​

cpp
std::vector<Color> vertexColors

textureSplattingEnabled ​

cpp
bool textureSplattingEnabled

Weighted texture layers; when enabled and present they decide the sample colors.

splatLayers ​

cpp
std::vector<TerrainSplatLayer> splatLayers

foliageLayers ​

cpp
std::vector<TerrainFoliageLayer> foliageLayers

Foliage scattered by a viewer.

RaiSim — physics for robotics and AI.