I am looking for a symmetrical LoS algorithm that would allow me to precompute all pair los when creating a level (dungeon or outdoor), and quickly update the table whenever a terrain change is made (mostly when someone opens a door, breach a wall, or when a character creates some kind of barrier).
So I would need to first determine all of the tiles that can see the one being updated, and raycast through the updated cells to update the visibility changes.
I wanted to go with this algorithm to compute LoS from each point, but I would need to change it to make it symmetrical: I was thinking about tracing LoS from center to center, but then, it becomes impractical to determine which cells are affected by a terrain change (because LoS can still be blocked even if you don't have LoS from center to center): I would have to first test each cell to determine whether it sees any part of the one being updated (unless I also store this value for this specific purpose, so I would store whether A can see any part of B, whether B can see any part of A, and whether the center of A can see the center of B).
I suppose if LoS was from center to any part of the target hex, or from any part of the target hex to center, it would remain symmetric, and would make it much easier to get all the cells affected by the change at once (instead of storing whether a center can see another one, I would have to store whether A can see any part of B, and whether B can see any part of A, then OR the results, so that would double the size of the table). That doesn't make for a very elegant rule, and I fear it could be pretty difficult to guess which cells can see each other at a glance.
What other options should I consider?
Thanks!