DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Site Discussions > Articles Discussion
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-31-2004, 11:22 PM   #1
DmEditor
DevMaster Editor
 
Join Date: Jan 2005
Posts: 54
Default

Using Trees for Sorted Rendering
Author: Henry Yuen
Description: This article discusses the idea of using Binary Search Trees (BSTs) to render objects in the desired order.
DmEditor is offline   Reply With Quote
Old 04-01-2004, 05:59 AM   #2
anubis
DevMaster Staff
 
anubis's Avatar
 
Join Date: Apr 2003
Location: Germany
Posts: 2,328
Default

nice article, thanks for your contribution
___________________________________________
If Prolog is the answer, what is the question ?
anubis is offline   Reply With Quote
Old 04-01-2004, 05:23 PM   #3
Noor
Senior Member
 
Join Date: Jan 2003
Location: ON, Canada
Posts: 524
Default

nicely written, Henry Yuen. Thank you
___________________________________________
"What ever happened to happily ever after?"
Noor is offline   Reply With Quote
Old 04-01-2004, 09:10 PM   #4
Cipher3D
New Member
 
Join Date: Apr 2004
Posts: 9
Default

Thanks a lot! Its my first tutorial...just trying to give back to the community that nourished me when i was a complete noob!
Cipher3D is offline   Reply With Quote
Old 04-02-2004, 03:11 AM   #5
anubis
DevMaster Staff
 
anubis's Avatar
 
Join Date: Apr 2003
Location: Germany
Posts: 2,328
Default

cool, sounds like you got more in stock ?
___________________________________________
If Prolog is the answer, what is the question ?
anubis is offline   Reply With Quote
Old 04-03-2004, 05:50 AM   #6
DrunkenCoder
Member
 
Join Date: Jul 2003
Posts: 97
Unhappy

why not use std::set? it's most often implemented as a RB-tree giving that it's mostly balanced.
DrunkenCoder is offline   Reply With Quote
Old 04-05-2004, 07:21 PM   #7
Cipher3D
New Member
 
Join Date: Apr 2004
Posts: 9
Default

I like to avoid STD containers, as:

1. I like to write things from scratch (yes, I know, I have the reinvent-the-wheel syndrome)
2. Overhead is slightly more than a bare bones tree. =).
Cipher3D is offline   Reply With Quote
Old 04-06-2004, 04:02 AM   #8
DrunkenCoder
Member
 
Join Date: Jul 2003
Posts: 97
Talking

Well I can understand the will to write it yourself it's a great learning experience.
But wouldn't it at least be quite smart to spend the time to implement a selfbalancing tree like a RB-tree then? Plain old B-trees have a tendency to get awfully unbalanced and that degenerates their performance to in worst case linear complexity O(N).

Also for locality of reference and other aspects I would consider taking a deeper look at your usage patterns, as describied in the article I think a heap would be a quite good match to.
DrunkenCoder is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 12:02 PM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.