Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cryo75

Quadtree traversal

This topic is 5373 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys I''m implementing a quadtree for a flat terrain. Currently this is the data structure:
	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

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!