raisim::rscene::Scene
struct · #include <raisim/Rscene.hpp>
A parsed .rscene file (see load()).
Public member functions
resolve
std::filesystem::path resolve(const std::string &reference) constResolves a reference against the scene directory, then its asset root.
Parameters
| Parameter | Description |
|---|---|
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
const Material *findMaterial(const std::string &id) constParameters
| Parameter | Description |
|---|---|
id (in) | material id |
Returns the material, or nullptr if none has the id. Points into materials
findAsset
const Asset *findAsset(const std::string &id) constParameters
| Parameter | Description |
|---|---|
id (in) | asset id |
Returns the asset, or nullptr if none has the id. Points into assets
Public attributes
file
std::filesystem::path fileabsolute path of the scene file
version
int versionFormat version from the header (1 or 2).
assetRoot
std::filesystem::path assetRootrelative to the scene directory, or absolute
physics
Physics physicsSolver settings.
environment
Record environmentRender 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
Record weatherrender
Record rendermaterials
std::vector<Material> materialsRender materials.
assets
std::vector<Asset> assetsAsset records (their default materials).
terrainTextures
std::vector<TerrainTexture> terrainTexturesTerrain texture layers.
terrains
std::vector<Terrain> terrainsHeight-map terrain regions.
lights
std::vector<Light> lightsVisible lights, in file order.
cameras
std::vector<Camera> camerasEnabled cameras.
objects
std::vector<Object> objectsScene objects: physics bodies and visual-only objects.
wires
std::vector<Wire> wiresEnabled wires.
instancedVisuals
std::vector<InstancedVisual> instancedVisualsEnabled instanced-visual batches.
localFogs
std::vector<LocalFog> localFogsEnabled local fog volumes and reflection probes.
reflectionProbes
std::vector<ReflectionProbe> reflectionProbes