First of all thanx alot for all your ideas\answers…
Just to clarify the purpose of the sorting:
I need to depth sort the transparent polys in my Q3 Viewer. Perhaps it would be faster to use the bsp´s back to front order but I don´t traverse the tree back to front which cuts down the time needed for traversing the tree. Therefore I thougt it would be faster to sort those few transparent polys afterwards with some fast algo. But I have to try if it is faster to traverse the tree correctly or to sort the transparent faces afterwards.
Michael: Your method needs exactly as much calculations as mine(If I don´t do the sqrt which isn´t neccessary):
dotproduct: 2add, 3* mult
3mult, 3sub, 2add
coco: I don´t understand exactly what you mean with “so you get correct sorting when objects are in the corners of the screen.”
bgl: Unfortunately I don´t know the number of vertices ´cause it ain´t fixed.
Anyway I could perhaps store the the average vertex of every face or the center of the face in my face struct and calc it ahead of runtime. But that would make my face struct bigger and therefore my engine would need more memory bandwidth…
Anyway thanx for all your help…
[This message has been edited by XBCT (edited 01-27-2001).]