Skip to content

raisim::rscene::Scene ​

struct · #include <raisim/Rscene.hpp>

A parsed .rscene file (see load()).

Public member functions ​

resolve ​

cpp
std::filesystem::path resolve(const std::string &reference) const

Resolves a reference against the scene directory, then its asset root.

Parameters

ParameterDescription
reference (in)file reference from the scene

Returns an empty or absolute reference unchanged; otherwise scene directory / reference if that file exists, else scene directory / assetRoot / reference (lexically normalized)

findMaterial ​

cpp
const Material *findMaterial(const std::string &id) const

Parameters

ParameterDescription
id (in)material id

Returns the material, or nullptr if none has the id. Points into materials

findAsset ​

cpp
const Asset *findAsset(const std::string &id) const

Parameters

ParameterDescription
id (in)asset id

Returns the asset, or nullptr if none has the id. Points into assets

Public attributes ​

file ​

cpp
std::filesystem::path file

absolute path of the scene file

version ​

cpp
int version

Format version from the header (1 or 2).

assetRoot ​

cpp
std::filesystem::path assetRoot

relative to the scene directory, or absolute

physics ​

cpp
Physics physics

Solver settings.

environment ​

cpp
Record environment

Render settings stay as records; only a viewer interprets them. A record the file omits has an empty tag, and the viewer uses Engine 2's defaults for it.

weather ​

cpp
Record weather

render ​

cpp
Record render

materials ​

cpp
std::vector<Material> materials

Render materials.

assets ​

cpp
std::vector<Asset> assets

Asset records (their default materials).

terrainTextures ​

cpp
std::vector<TerrainTexture> terrainTextures

Terrain texture layers.

terrains ​

cpp
std::vector<Terrain> terrains

Height-map terrain regions.

lights ​

cpp
std::vector<Light> lights

Visible lights, in file order.

cameras ​

cpp
std::vector<Camera> cameras

Enabled cameras.

objects ​

cpp
std::vector<Object> objects

Scene objects: physics bodies and visual-only objects.

wires ​

cpp
std::vector<Wire> wires

Enabled wires.

instancedVisuals ​

cpp
std::vector<InstancedVisual> instancedVisuals

Enabled instanced-visual batches.

localFogs ​

cpp
std::vector<LocalFog> localFogs

Enabled local fog volumes and reflection probes.

reflectionProbes ​

cpp
std::vector<ReflectionProbe> reflectionProbes

RaiSim — physics for robotics and AI.