[bgl] adding nodes recursively
Hello all: I have a game with multiple rooms, which I would like to map to a graph. Given this, I have a couple of questions. One of my goals is to separate each individual area and have it on it's own graph, then connect the graphs. Is this a possibility? I remember reading about connected graphs for my data structures class, but we didn't get to far with them. My second issue is I will have a vector of rooms, which all have exits. Each individual room will be a vertex with the exits being the edges. I can recursively add all the exits that a room points to, then come back and add the rest of the exits. But there may be two exits pointing to the same room. Is there a quick way that I could insure that rather than creating a new vertex, I could just point the edge to the preexisting vertex? Finally, i have one other question. I plan to create resources based on a bunch of different factors. Basically I need a way to determine the closest resources and perhaps get the shortest path to them, or the weight of all of the edges that would point to the n closest resources that were spawned. I want to use this weight to determine the density or find another way to determine density and spread the resources out across the world. -- Take care, Ty http://tds-solutions.net He that will not reason is a bigot; he that cannot reason is a fool; he that dares not reason is a slave.
participants (1)
-
Littlefield, Tyler