|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: 3d-model data structures.......
Josiah Avery wrote: > > Hello, > > I was wondering if anyone had any suggestions on how to create the most > effecient data structures to represent a 3d odject. The ways I have been > looking at where > > 1. A collection of points. > 2. A collection of faces. > 3. A collection of unshared points ( ie a cube be though of as having 24 > points; 6 planes of 4 points a piece. But there are only really 8 points > that are unique. Generally you get the best results by using the layout supported by your 3D library. Having said the obvious and not to helpful answer... I have to point out that any answer I give for that question will be wrong for some combination of hardware and software. By minimizing the number of points you minimize the number transformations that have to be done. That can give you a speed boost on some machines. By minimizing the number of points you can also reduce the total size of the data. Having smaller data means there is less chance of it being swapped out and again that can give you some extra speed. Of course, minimizing the number of points can result in more non-local references and result in lots of cache incoherency and cause a significant loss of performance. All that being said, I'm fond of using the minimal number of points with things like lines and polygons and even complete objects being made up of pointers to a set of shared points. So, a cube is made up of 8 points referenced from either 6 quads or 12 triangles. Hope that helps Bob P. > > If there are some other ways, I'd be glad to hear them. Also, if someone has > any sample code, and is willing to share, that would be very cool. > > On a side note, if you guys haven't already, be sure and check out this > new online game devlopment comic strip at www.badtech.com > > Thanks in advance. > > Josiah Avery > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > ================================================================= > The GameProgrammer.Com mailing list is for the open discussion > of any topic related to the art, science, and business of > programming games. This list is especially tolerant of beginners. > We were all beginners once > > To SUBSCRIBE or UNSUBSCRIBE please visit: > http://gameprogrammer.com/mailinglist.html ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|