|
|
OperatorRange | operators () |
| | Returns an iterable range over all operators in the network.
|
| |
|
| NetworkManager (const NetworkManager &obj)=delete |
| | Deleted the copy constructor for singleton.
|
| |
| OpId | createOperator (op::OpInfo opInfo, bt::Vector2f position={0.f, 0.f}) |
| | Creates a new node in the network.
|
| |
|
std::optional< OpId > | getDisplayOp () |
| | Returns the operator ID for the node with its display flag set. There can only be only be one operator displayed at a time. Return value is nullopt if no node is set to display.
|
| |
|
enzo::nt::UpdateLock | lockUpdates () |
| | Creates a lock object that prevents cooking until destroyed.
|
| |
|
void | update () |
| | Cooks dirtied nodes, is called automatically.
|
| |
| bool | isValidOp (nt::OpId opId) |
| | Returns whether the node exists in the network and is valid.
|
| |
|
GeometryOperator & | getGeoOperator (nt::OpId opId) |
| | Returns a reference to the GeometryOperator with the given OpId.
|
| |
|
void | setDisplayOp (OpId opId) |
| | Sets given OpId to be displayed, releasing previous display Node.
|
| |
|
void | clearDisplayFlag () |
| | Clears the display flag so no node is displayed.
|
| |
| void | setSelectedNode (OpId opId, bool selected, bool add=false) |
| | Set the selection state for the given node.
|
| |
|
const std::vector< enzo::nt::OpId > & | getSelectedNodes () |
| | Returns the OpIds for all selected nodes.
|
| |
|
void | setSelectedNodes (std::vector< enzo::nt::OpId > opIds) |
| | Replaces the entire selection with the given set of nodes.
|
| |
| void | moveNode (OpId opId, bt::Vector2f newPos, bool skipUndo=false) |
| | Moves a node to a new position, pushing an undo command.
|
| |
| void | deleteNode (OpId opId) |
| | Deletes a node, pushing an undo command.
|
| |
| void | removeOperator (OpId opId) |
| | Removes an operator and all its connections from the network.
|
| |
| void | restoreOperator (OpId opId, op::OpInfo opInfo) |
| | Restores a previously removed operator with a specific OpId.
|
| |
|
void | clear () |
| | Clears all operators and resets the network to its initial state.
|
| |
| void | cookOp (enzo::nt::OpId opId) |
| | Cooks the given operator.
|
| |
|
UndoStack & | undoStack () |
| |
|
|
|
boost::signals2::signal< void(std::optional< nt::OpId >)> | displayNodeChanged |
| |
|
boost::signals2::signal< void(std::shared_ptr< const enzo::NodePacket >)> | displayGeoChanged |
| |
|
boost::signals2::signal< void(std::shared_ptr< const enzo::NodePacket >)> | selectedGeoChanged |
| |
|
boost::signals2::signal< void(std::vector< nt::OpId > selectedNodeIds)> | selectedNodesChanged |
| |
|
boost::signals2::signal< void(nt::OpId)> | operatorCreated |
| |
|
boost::signals2::signal< void(nt::OpId)> | operatorRemoved |
| |
|
boost::signals2::signal< void(std::weak_ptr< nt::GeometryConnection >)> | connectionCreated |
| |
|
boost::signals2::signal< void()> | networkCleared |
| |
|
boost::signals2::signal< void(nt::OpId, bt::Vector2f)> | nodePositionChanged |
| |
The central coordinator of the engine's node system.
The network manager is the central coordinator of the engine’s node system. It manages the lifecycle of operators, including their creation, storage, and validation, while also tracking dependencies between them. Acting as a singleton, it ensures that all parts of the engine work with a single consistent view of the network, providing global access. Beyond just storing operators, it also controls cooking and traversing dependency graphs, ensuring that updates flow correctly through the network when nodes change.
- Todo
- remove Qobject inheritance, this is no longer needed since switching to boost signals.