# redundant structures poll

## Recommended Posts

hello everyone, I was working on my project today, and tinkering with some of the world geometry, and I realized that I'm holding effectively the same information in a whole lot of different formats. Map geometry is held in raw triangles for rendering, in bounded segments and layered structures for vision testing, a special blocked format for occlusion testing, and everything is held all over again in a seperate format that is optimized for collision detection, and seperate data set to describe what parts should be rendered, previous to the other stages that do a more fine grained object culling, and then a simplified version of the data that the AI system interacts with [so it doesn't have to test so many triangles, optimized for quick polling or large areas], and another set of data that gets converted into graph nodes for the path finder, and blah blah blah. It's all effectively the same information [a matter of a fact, a large number of the additional sets can actually derive eachother. For example, the collision detection set can derive the original map geometry], but is stored redundantly because each seperate storage of it is optimized for another task. What parts of your data do you find yourself doing. std::cout<<"Over"; while(1)std::cout<<"and over"; representing the same data set, in different formats.

##### Share on other sites
I think I lost your question somewhere... :D

but...

I do it this way (pseudo code):
struct obj{model Main; //hi res render model.model LOD; //lo res render model, substitutes for collisiondetection as well..};Regarding redundancy -I store all objects where they should be:Object in list<obj>Objects;PathNodes in list<node> Nodes;etc...Then I simply refer to the original data with a pointer whenever I need to have objects (for instance)struct Octree{list<obj*> Objects;list<node*> Nodes;};etc.

Works really well, and data is never loaded twice!

/Robert

##### Share on other sites
It wasn't a technical question, i'm just curious if other people find themselves storing the same data in a whole bunch of different forms, for different purposes, and what other people see as the source of the most data redundancy. Perhaps this isn't the place for this....

nevermind : /