SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::prefab::SceneParams Struct Reference

Parameters that are global to the Scene in which this prefab will be instantiated. More...

#include <mochi_prefab.h>

Public Member Functions

bool operator== (SceneParams const &) const =default

Public Attributes

std::optional< DynamicStringcomment = std::nullopt
 Optional serialized comment.
DynamicString description {}
 Human-readable description of the scene.
std::optional< Real3gravity = std::nullopt
 Optional gravity vector [m/s^2] in world frame.
std::optional< SolverParamssolver = std::nullopt
 Optional solver parameters.

Detailed Description

Parameters that are global to the Scene in which this prefab will be instantiated.

Note
If prefabs are nested, then only the top-level prefab will use these parameters.

Definition at line 38 of file mochi_prefab.h.

Member Function Documentation

◆ operator==()

bool superdex::prefab::SceneParams::operator== ( SceneParams const & ) const
default

Member Data Documentation

◆ comment

std::optional<DynamicString> superdex::prefab::SceneParams::comment = std::nullopt

Optional serialized comment.

Definition at line 39 of file mochi_prefab.h.

◆ description

DynamicString superdex::prefab::SceneParams::description {}

Human-readable description of the scene.

Definition at line 40 of file mochi_prefab.h.

◆ gravity

std::optional<Real3> superdex::prefab::SceneParams::gravity = std::nullopt

Optional gravity vector [m/s^2] in world frame.

AddToScene replaces the scene's gravity only when this value is provided by the top-level prefab and PrefabParams::applySceneSettings is true. Otherwise, the existing scene gravity is preserved.

Definition at line 41 of file mochi_prefab.h.

◆ solver

std::optional<SolverParams> superdex::prefab::SceneParams::solver = std::nullopt

Optional solver parameters.

AddToScene replaces the scene's complete solver parameters only when this value is provided by the top-level prefab and PrefabParams::applySceneSettings is true. In all other cases, the existing scene solver parameters are preserved. When replacement occurs, fields omitted from the solver object use their default values, e.g. "solver": {} resets all solver parameters to their defaults.

Definition at line 42 of file mochi_prefab.h.


The documentation for this struct was generated from the following files: