I want to store some info about two objects. Specifically, I want to store the state between a light and an entity, so I only have to re-check visibility when something moves.
Previously I have done this by creating a type that stored the info, and storing it in lists in both the entity and light. I was wondering if there was a faster simpler way to do this, something like TMap that stored a value for two objects.
This is the idea I am getting at:
Info = GetValue(entity,light)?
My thinking from my terrain system is carrying over to this. I could just create a big "texture", and just use the entity handle as the x or y position to retrieve info. It's the same idea as reading data from a pixmap.
Of course, this would be somewhat redundant, since they could be linked a-b or b-a (either entity could be x or y) so the graph would be twice as big as is necessary.
Any ideas?
Previously I have done this by creating a type that stored the info, and storing it in lists in both the entity and light. I was wondering if there was a faster simpler way to do this, something like TMap that stored a value for two objects.
This is the idea I am getting at:
Info = GetValue(entity,light)?
My thinking from my terrain system is carrying over to this. I could just create a big "texture", and just use the entity handle as the x or y position to retrieve info. It's the same idea as reading data from a pixmap.
Of course, this would be somewhat redundant, since they could be linked a-b or b-a (either entity could be x or y) so the graph would be twice as big as is necessary.
Any ideas?