|
SuperDex Physics C++ API
|
Reference to another prefab (scene or actor) for prefab nesting. More...
#include <mochi_prefab.h>
Public Member Functions | |
| bool | operator== (PrefabReference const &) const =default |
Public Attributes | |
| std::optional< DynamicString > | comment = std::nullopt |
| Optional serialized comment. | |
| DynamicString | name {} |
| Name of the nested prefab instance. | |
| DynamicString | path {} |
| Path to the nested prefab file. | |
| PrefabHandle | prefab {} |
| Handle to the loaded nested prefab. | |
| Quaternion | rotation {} |
| Rotation quaternion [x, y, z, w] of the nested prefab in the parent's local space. | |
| real | scale = 1_r |
| Uniform scale of the nested prefab, relative to the parent prefab. | |
| Real3 | translation {} |
| Translation [x, y, z] of the nested prefab in the parent's local space. | |
Reference to another prefab (scene or actor) for prefab nesting.
Definition at line 286 of file mochi_prefab.h.
|
default |
| std::optional<DynamicString> superdex::prefab::PrefabReference::comment = std::nullopt |
Optional serialized comment.
Definition at line 287 of file mochi_prefab.h.
| DynamicString superdex::prefab::PrefabReference::name {} |
Name of the nested prefab instance.
Used to format the names of nested actors in the form "prefabName/actorName".
Definition at line 288 of file mochi_prefab.h.
| DynamicString superdex::prefab::PrefabReference::path {} |
Path to the nested prefab file.
If non-empty, LoadNestedPrefabs reloads the prefab from this path on every call. EnsureFullyLoaded loads it from this path only if the reference does not already contain a loaded prefab. If empty, both functions require the reference to already contain a loaded prefab; they keep that prefab and load all prefabs nested within it.
Definition at line 289 of file mochi_prefab.h.
| PrefabHandle superdex::prefab::PrefabReference::prefab {} |
Handle to the loaded nested prefab.
Runtime state, populated at load time and never serialized.
Definition at line 295 of file mochi_prefab.h.
| Quaternion superdex::prefab::PrefabReference::rotation {} |
Rotation quaternion [x, y, z, w] of the nested prefab in the parent's local space.
Definition at line 291 of file mochi_prefab.h.
| real superdex::prefab::PrefabReference::scale = 1_r |
Uniform scale of the nested prefab, relative to the parent prefab.
The scale applied to this nested prefab is this value multiplied by PrefabParams::scale and each enclosing PrefabReference::scale. See PrefabParams::scale for what scaling affects.
Definition at line 290 of file mochi_prefab.h.
| Real3 superdex::prefab::PrefabReference::translation {} |
Translation [x, y, z] of the nested prefab in the parent's local space.
Definition at line 292 of file mochi_prefab.h.