Road splitting setup (intersection data)

This commit is contained in:
2026-04-29 23:57:23 +02:00
parent 4ec32252cf
commit e72aa8fc5f

View File

@@ -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,
};