|
| | Workspace (std::string_view type, UID handle) |
| | Creates a new workspace rooted at a single fresh node of the given type.
|
| | Workspace (UID uid) |
| | Opens an existing workspace by loading the prefab at the given UID.
|
| | Workspace (UID uid, std::string_view source_uri) |
| | Opens a workspace bound to the given asset UID but loading its content from another file.
|
| auto | name () -> std::string override |
| auto | asWorkspace () -> Workspace *override |
| | Downcast helper for owners that need Workspace-specific state.
|
| void | registerDependency (Node &from, Node &to) override |
| | No-op; Workspace has no tick scheduler and never registers dependencies.
|
| void | unregisterDependency (Node &from, Node &to) override |
| void | nodeEnabledChanged (Node &node) noexcept override |
| auto | participatesIn (NodeOwnerParticipation use) const noexcept -> bool override |
| | Determines if this owner is elegible for runtime systems.
|
| auto | receivesEvents () const noexcept -> bool override |
| auto | findFrom (const Node &origin, std::string_view query) -> Box< Node > override |
| | Name lookup over origin's subtree.
|
| auto | findFrom (const Node &origin, const UID &uid) -> Box< Node > override |
| | UID lookup over origin's subtree.
|
| auto | searchFrom (const Node &origin, std::string_view query) -> std::vector< Box< Node > > override |
| | Same query grammar as World::searchFrom(); searches only within m_root_node.
|
| virtual auto | isPlaying () const -> bool |
| | True for PlayWorkspace, gates gizmo interaction off so it can never run against a live game.
|
|
auto | usesGameCamera () const noexcept -> bool |
|
void | inheritEditorCamera (const Workspace &source) |
|
void | preparePrefabReload (UID uid) |
|
void | finishPrefabReload () |
| void | tick () override |
| | Editor-only per-frame work: camera preview, animation preview, editorTick lifecycle, inspector streaming.
|
|
auto | rootNode () const -> const Node & |
|
auto | isValid () const -> bool |
|
auto | findPrefabInstance (UID prefab, UID instance) -> Box< Node > |
| auto | gizmoRenderState () const -> GizmoRenderState |
| | snapshot of the active gizmo's transform/highlight state, resolved on the main thread for Engine::tick() to hand to VulkanRenderer
|
|
void | syncListenerState () noexcept |
|
auto | isEditing () noexcept -> bool |
| | True for a Workspace open for editing: lifecycle callbacks still run there, but the game is not running.
|
|
auto | treeMutex () const noexcept -> std::shared_mutex & |
|
virtual void | registerInteraction (Node &, Node &) |
|
void | activateCamera (Camera &camera) |
|
void | setMainCamera (Camera &camera) |
| | Like activateCamera(), but replaces whatever camera is currently active.
|
|
void | deactivateCamera (Camera &camera) |
|
void | activateCameraController (CameraController &controller) |
|
void | deactivateCameraController (CameraController &controller) |
|
auto | requestRuntimeCreate (Node &parent, std::string_view type) -> Box< Node > |
|
auto | requestRuntimeSpawn (Node &parent, UID uid) -> Box< Node > |
|
auto | requestRuntimeSpawn (Node &parent, std::string_view) -> Box< Node > |
|
void | reloadScriptsUsing (UID script_uid) noexcept |
|
void | refreshNodeInfos () noexcept |
|
void | rebindAssetHandles (UID asset_uid) noexcept |
|
| auto | owningPrefabUid () const -> UID override |
|
| Workspace (UID handle, EmptyTag) |
| | Sets only the handle and subscribes to editor events; used by PlayWorkspace.
|
|
void | sendEnabledChanges () |
|
auto | isActiveWorkspace () const noexcept -> bool |
|
auto | gizmoOrigin () const -> glm::vec3 |
|
auto | gizmoOrientation () const -> glm::quat |
|
auto | gizmoScale () const -> float |
|
auto | gizmoInteractionAllowed () const -> bool |
|
auto | collectSizeHandles () const -> std::pair< std::array< SizeHandlePoint, k_max_size_handles >, uint32_t > |
|
void | gizmoApplySizeDrag (float delta) |
|
void | gizmoUpdateHover () |
|
void | gizmoBeginDrag (GizmoHandle handle) |
|
void | gizmoUpdateDrag () |
|
void | gizmoEndDrag () |
|
void | eventSubscriptions () |
|
void | initializeHistory (bool available, bool initially_saved) |
|
auto | restoreHistorySnapshot (const assets::Prefab &snapshot) -> bool |
|
void | destroyOwnedTree (Box< Node > &root) |
|
auto | duplicateNode (Box< Node > src, Box< Node > par, bool after_source) -> Box< Node > |
| void | subscribeVoxelEditing () |
|
void | voxelUpdatePreview (uint8_t kind) |
|
void | voxelReparent (Box< Node > node, Box< Node > parent, size_t index) |
|
auto | voxelWrapInGroup (Box< Node > node, std::string_view name) -> Box< Node > |
|
auto | voxelToolShape () -> ProceduralVoxel * |
|
void | voxelToolMouseMove () |
|
auto | voxelToolMouseButton (uint32_t button, bool pressed, int mods) -> bool |
|
void | voxelToolCancel () |
|
auto | pickNodeUnderMouse () -> Box< Node > |
|
auto | retypeNode (Box< Node > &target, std::string_view type, bool keep_fields) -> Box< Node > |
|
void | promoteNode (Box< Node > &target, std::string_view path) |
|
template<typename F> |
| void | recordHistory (WorkspaceHistory::Context context, F &&mutation) |
|
void | initFromPrefab (const assets::Handle< assets::Prefab > &file) |
| | instantiates the prefab and sets up the root node
|
| void | applyActiveCamera () override |
|
void | seedPrefabContext (InstantiateContext &context, const Node *parent=nullptr) const |
| auto | nodeAllocation (std::string_view type="toast::Node") noexcept -> Box< Node > |
| | Allocates a Node and its ControlBox in one contiguous block.
|
| auto | nodeAllocation (const assets::Prefab::BasicNode &node_data, uint64_t script_group=0, bool build_scripts=true) noexcept -> Box< Node > |
| | Allocates a Node and initializes its name and type from a prefab data record.
|
|
void | buildLeaves (const assets::Handle< assets::Prefab > &file, uint64_t group, const std::vector< size_t > &leaf_slots, std::vector< Box< Node > > &slots) |
| auto | buildTree (std::vector< Box< Node > > &&nodes, const assets::Handle< assets::Prefab > &file) -> Box< Node > |
| | Assembles a flat list of allocated nodes into a parent/child tree.
|
| auto | instantiate (const assets::Handle< assets::Prefab > &file, InstantiateContext &ctx) -> Box< Node > |
| | Allocates and initializes a full node tree from a prefab asset.
|
|
void | applyFields (Node &node, const assets::Prefab::BasicNode &data) |
| | Copies reflected field values from the serialized BasicNode onto the live node; skips fields absent from NodeInfo.
|
|
void | applyLuaOverrides (Node &node, const assets::Prefab::BasicNode &data, const scripting::NodeResolver &find_node) |
| | Restores edited Lua script variables saved in the prefab.
|
|
void | releaseNode (_detail::ControlBox &control) noexcept |
| | Marks the ControlBox as dead and increments tombstones; does not free memory.
|
|
void | reapTombstones () noexcept |
| | Sweeps the nodes set and erases any ControlBox whose ref count is zero; short-circuits if tombstones == 0.
|
|
void | findCamera () |
|
void | findCameraController () |
|
void | tickActiveCameraController () |
|
void | beginCameraShutdown () noexcept |
|
auto | activeCamera () noexcept -> Box< Camera > & |
|
auto | activeRenderCamera () noexcept -> Camera * |
|
template<typename Fn> |
| void | forEachNode (Fn &&fn) const |
|
|
UID | m_handle |
|
std::unique_ptr< assets::Prefab > | m_owned_source_prefab |
|
Box< Node > | m_root_node |
|
Box< Node > | m_focused_node |
|
event::Listener | m_listener |
|
GizmoTool | m_gizmo_tool = GizmoTool::select |
|
bool | m_world_space = false |
| | false = local coordinates
|
|
SnapSetting | m_translate_snap {true, 0.10f} |
|
SnapSetting | m_rotate_snap {true, 30.0f} |
|
SnapSetting | m_scale_snap {true, 0.10f} |
|
bool | m_game_camera = false |
| | false = editor camera
|
|
std::unique_ptr< Camera > | m_editor_camera |
|
EditorCameraController | m_editor_camera_controller |
| | drives m_editor_camera; ticked from tick() below
|
|
std::unique_ptr< WorkspaceHistory > | m_history |
|
std::mutex | m_enabled_changes_mutex |
|
std::vector< Box< Node > > | m_enabled_changes |
|
glm::vec2 | m_gizmo_mouse_pos {0.0f, 0.0f} |
| | The gizmo's current state.
|
|
GizmoHandle | m_gizmo_hover = GizmoHandle::none |
|
GizmoHandle | m_gizmo_drag = GizmoHandle::none |
|
glm::vec3 | m_gizmo_drag_start_world_pos {0.0f} |
|
glm::quat | m_gizmo_drag_start_rotation {1.0f, 0.0f, 0.0f, 0.0f} |
|
glm::vec3 | m_gizmo_drag_start_scale {1.0f} |
|
glm::vec3 | m_gizmo_drag_anchor {0.0f} |
| | closest-point-on-axis or ray-plane hit at drag start
|
|
glm::vec3 | m_gizmo_drag_axis {0.0f} |
| | world-space axis direction, for axis/ring drags
|
|
glm::vec3 | m_gizmo_drag_plane_normal {0.0f} |
| | world-space plane normal, for plane/center/ring drags
|
|
float | m_gizmo_drag_start_angle = 0.0f |
| | radians, for rotate drags
|
|
float | m_gizmo_drag_current_factor = 1.0f |
| | live scale factor, for the scale feedback stretch
|
|
glm::vec3 | m_gizmo_drag_start_size {0.0f} |
|
glm::vec3 | m_gizmo_drag_start_local_pos {0.0f} |
|
glm::quat | m_gizmo_drag_start_local_rot {1.0f, 0.0f, 0.0f, 0.0f} |
|
std::optional< std::string > | m_gizmo_history_start |
| | dragged field's value at drag start, set while the drag owns the open history transaction
|
|
VoxelToolState | m_voxel_tool |
|
Box< Node > | m_voxel_preview |
|
std::optional< glm::vec2 > | m_pick_press |
|
std::mutex | nodes_mutex |
|
size_t | tombstones = 0 |
| | short-circuits the reap sweep when there's nothing to clean
|
|
physics::Accumulator | m_accumulator |
Single-viewport node owner used by the editor.
A lightweight alternative to World: owns a node tree through the INodeOwner interface but never ticks nodes, never builds a dependency graph, and never runs lifecycle functions beyond those triggered by instantiation. Use it to display or edit a node tree without running any game logic
- See also
- World, INodeOwner