From fd3e5efa4609b1eabd3d982099293e04a80a1ee7 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 23 Mar 2025 20:01:28 +0100 Subject: feat(ecs): add integration with vizoxide crate --- ecs/src/component/storage/graph.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ecs/src/component/storage') diff --git a/ecs/src/component/storage/graph.rs b/ecs/src/component/storage/graph.rs index a221877..11160e7 100644 --- a/ecs/src/component/storage/graph.rs +++ b/ecs/src/component/storage/graph.rs @@ -71,6 +71,12 @@ impl Graph })) } + #[cfg(feature = "vizoxide")] + pub fn iter_nodes(&self) -> impl Iterator + { + self.nodes.iter() + } + pub fn dfs_archetype_add_edges( &self, archetype_id: ArchetypeId, @@ -233,6 +239,12 @@ impl ArchetypeNode self.edges.entry(component_id).or_insert_with(insert_fn) } + #[cfg(feature = "vizoxide")] + pub fn iter_edges(&self) -> impl Iterator + { + self.edges.iter() + } + pub fn get_edges_mut(&mut self, component_id: Uid) -> Option<&mut ArchetypeEdges> { debug_assert_eq!(component_id.kind(), UidKind::Component); -- cgit v1.2.3-18-g5258