I am trying to load an STL mesh file and store its triangles an in octree data structures for some scientific analysis (not for gaming).
as shown in the image, Triangle 1 is stored in octree nodes NE, SE, SW and NW while triangle 2 is stored in octree nodes NW and SW. (2d representation but it's the same story in 3d).
it would be pointless to divided nodes NW and SW the since the two triangles shares the red edge. and this problem becomes more troublesome if I have more than two triangles spanning over several cells.
so, what is the correct way of storing triangles in octree?
ps- I don't want to clip triangles.