Original Post
I was wondering how people implement their octrees, do you use them to actually store the specific instances of elements, or do you use them to store references of elements. At the moment I contain all the elements in an external list and add element pointers into the octree, at each level I add all the pointers to all the elements that are contained within that bounding volume, the idea being that I can create a large octree structure during initialisation and then at run-time decide to stop searching at a certain level if it is required, which I figure you wouldn't be able to do if you actually use composition to store the elements at the leaf nodes. One way around this could be to use composition at the leaf nodes but store references or pointers to all the elemenst contained within the volume. Which do you think is the best solution, pure aggregation, or composition at the leaf nodes with aggregation at the internal nodes?