Re: Depth-Sorting Axis-Aligned Boxes

[email protected]
Newsgroups gmane.games.devel.algorithms
Message-ID <OFB38D8F1E.A8CE5200-ON88257607.00628D67-88257607.006431DB@playstation.sony.com>
Raigan wrote:
> Sadly I don't have a z-buffer, so I need to determine a way to sort
> the boxes back-to-front. The boxes will all be non-overlapping,
> although they may be touching, and will move smoothly (i.e not by
> grid-sized steps as is common in some games).

The picture you included in a subsequent post HAD the boxes
overlapping.


> Is there a simple solution to this problem? I.e a formula which
> considers the extents and/or a reference point on each box to
> produce a back-to-front order? Or am I stuck with the general
> solution: build a BSP tree?

Building a BSP tree makes sense for static geometry but perhaps
less for dynamic geometry (though you could merge dynamic objects
into a prebuilt static tree).

There's also Newell-Newell-Sancha:

http://en.wikipedia.org/wiki/Newell%27s_algorithm

which, from the limited description you gave, sounds like a
better option for you.


Christer Ericson, Director of Tools and Technology
Sony Computer Entertainment, Santa Monica


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.