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

Top-level prefab describing a complete or partial physics scene (possibly just one actor). More...

#include <mochi_prefab.h>

Public Member Functions

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

Public Attributes

ActorLists actors {}
 Lists of actors by type.
std::optional< DynamicString > comment = std::nullopt
 Optional serialized comment.
ConstraintLists constraints {}
 Lists of constraints by type.
std::optional< ContactFilter > contactFilter = std::nullopt
 Contact filter settings for selective contact filtering.
std::optional< DynamicArray< ContactPairParamsOverrideEntry > > contactPairParamsOverrides
 Optional actor-pair contact parameter overrides.
DynamicArray< PoseControllerPrefab > controllers {}
 List of pose controllers.
DynamicArray< PrefabReference > prefabs {}
 List of nested prefab references.
std::optional< SceneParams > scene = std::nullopt
 Global scene parameters (top-level prefab only).
std::optional< DynamicString > sourceFilePath = std::nullopt
 Path this prefab was loaded from, exactly as passed to the loading function.

Detailed Description

Top-level prefab describing a complete or partial physics scene (possibly just one actor).

Definition at line 300 of file mochi_prefab.h.

Member Function Documentation

◆ operator==()

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

Member Data Documentation

◆ actors

ActorLists superdex::prefab::ScenePrefab::actors {}

Lists of actors by type.

Definition at line 302 of file mochi_prefab.h.

◆ comment

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

Optional serialized comment.

Definition at line 301 of file mochi_prefab.h.

◆ constraints

ConstraintLists superdex::prefab::ScenePrefab::constraints {}

Lists of constraints by type.

Definition at line 303 of file mochi_prefab.h.

◆ contactFilter

std::optional<ContactFilter> superdex::prefab::ScenePrefab::contactFilter = std::nullopt

Contact filter settings for selective contact filtering.

Definition at line 308 of file mochi_prefab.h.

◆ contactPairParamsOverrides

std::optional<DynamicArray<ContactPairParamsOverrideEntry> > superdex::prefab::ScenePrefab::contactPairParamsOverrides
Initial value:
=
std::nullopt

Optional actor-pair contact parameter overrides.

Entries are applied in array order after all actors in their prefab have been created. A later entry for the same unordered actor pair replaces the earlier override rather than merging with it. Nested child prefab entries are applied before parent entries.

Definition at line 309 of file mochi_prefab.h.

◆ controllers

DynamicArray<PoseControllerPrefab> superdex::prefab::ScenePrefab::controllers {}

List of pose controllers.

Definition at line 304 of file mochi_prefab.h.

◆ prefabs

DynamicArray<PrefabReference> superdex::prefab::ScenePrefab::prefabs {}

List of nested prefab references.

Definition at line 305 of file mochi_prefab.h.

◆ scene

std::optional<SceneParams> superdex::prefab::ScenePrefab::scene = std::nullopt

Global scene parameters (top-level prefab only).

Definition at line 306 of file mochi_prefab.h.

◆ sourceFilePath

std::optional<DynamicString> superdex::prefab::ScenePrefab::sourceFilePath = std::nullopt

Path this prefab was loaded from, exactly as passed to the loading function.

Used to resolve prefab-relative ("./"-prefixed) nested prefab and shape paths.

Note
Set by the file-based loaders (LoadFromFile, ShallowLoadFromFile). It is not converted to an absolute path: a relative path passed to the loader is stored as-is. The string-based loaders (LoadFromJsonString, ShallowLoadFromJsonString) leave it empty. In that case, "./"-prefixed paths fall back to resolution against the root path supplied when the paths are resolved.
Runtime state, never serialized.

Definition at line 307 of file mochi_prefab.h.


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