diff --git a/src/common/structures.zig b/src/common/structures.zig index 3feeba5..ad2bc6a 100644 --- a/src/common/structures.zig +++ b/src/common/structures.zig @@ -1,3 +1,5 @@ +const Vector2 = @import("raylib").Vector2; + const Road = @import("../infrastructure/road.zig").Road; const Node = @import("../infrastructure/node.zig").Node; @@ -5,4 +7,13 @@ const Node = @import("../infrastructure/node.zig").Node; pub const Entity = union(enum) { node: *Node, road: *Road, +}; + +/// Represents intersection data, mainly used in cases where we draw over existing roads +/// and wish to see data about such intersections or collisions +pub const IntersectionData = struct { + /// Tracks the location of the intersection + pos: Vector2, + /// Points to the road where the intersection occured + road: *Road, }; \ No newline at end of file