Archived

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

need help~~~~~~~~

This topic is 5796 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

Because your data is in a structure doesn''t mean you are bound to it.

A possibility :

- Create an appropriately sized array (malloc/new...), once should be enough.
- fill it with pointers to your polys.
- sort the pointer array according to the Z of the pointees.

Share this post


Link to post
Share on other sites
With a vector : brute force N^2.

You have a BSP tree ?

- determine which side of the partition is in the back (dot product the view vector with the normal of the partition plane).
- render the back side (recursively)
- render the front side (recursively)

You don''t have a BSP tree ? Build one (with pointers to the actual data).

Share this post


Link to post
Share on other sites