typedef struct tagQuadNode {
bool bIsNode;
D3DXVECTOR3 vCoords[4];
UINT uiBranches[4];
UINT uiID;
UINT uiParentID;
} NODE;
NODE* pNodeList;
Would it be more efficient to change the uiBranches to pointers to child nodes/leaves structures?
Secondly, I still didn''t find a way to efficiently traverse the quadtree and draw what is necessary. Anyone has ideas?
Thirdly, what would be faster to render:
1. One whole vertex buffer and going through each leaf and render it individually, or
2. Go through each leaf and if it needs to be rendered, add it to temporary vertexbuffer, then render the whole vb in one go.
Thanks,
Ivan
Quadtree traversal
Hi guys
I''m implementing a quadtree for a flat terrain. Currently this is the data structure:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement