Graph node mutation helpers.
Summary
Functions
Adds child to parent if not already present.
Adds already-ordered children to parent in one append.
Removes all direct children under a parent in one batch.
Inserts or replaces a node and keeps type/name indexes current.
Rebuilds type/name lookup indexes from current graph nodes.
Removes a subtree rooted at guid.
Removes multiple subtrees in one batch.
Returns subtree GUIDs in descendants-first order.
Functions
@spec child( Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid(), Figler.Scene.Graph.GUID.graph_guid() ) :: Figler.Scene.Graph.t()
Adds child to parent if not already present.
@spec children(Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid(), [ Figler.Scene.Graph.GUID.graph_guid() ]) :: Figler.Scene.Graph.t()
Adds already-ordered children to parent in one append.
@spec clear_children( Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid(), keyword() ) :: Figler.Scene.Graph.t()
Removes all direct children under a parent in one batch.
@spec put( Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid(), Figler.Scene.Node.t(), Figler.Scene.Graph.Seed.Node.t() | nil ) :: Figler.Scene.Graph.t()
Inserts or replaces a node and keeps type/name indexes current.
@spec reindex(Figler.Scene.Graph.t()) :: Figler.Scene.Graph.t()
Rebuilds type/name lookup indexes from current graph nodes.
@spec remove(Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid(), keyword()) :: Figler.Scene.Graph.t()
Removes a subtree rooted at guid.
@spec remove_many( Figler.Scene.Graph.t(), [Figler.Scene.Graph.GUID.graph_guid()], keyword() ) :: Figler.Scene.Graph.t()
Removes multiple subtrees in one batch.
@spec subtree(Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid()) :: [ Figler.Scene.Graph.GUID.graph_guid() ]
Returns subtree GUIDs in descendants-first order.