LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Data structures, typedefs, arrays and OpenGL?

[ILUG] Data structures, typedefs, arrays and OpenGL?

Padraig Brady padraig at antefacto.com
Thu May 30 13:52:03 IST 2002


Hmm...
You want the best datastructure to represent an N dimensional object.

An (obvious) observation first:

The minimum number of unique points required to
describe a given dimensional object is:

0D = 1
1D = 2
2D = 3
3D = 4
: : :
ND = N-1 ((N-1)D objects)

So there are 2 variable sizes involved here,
N, which determines the size of each point,
and the number of dimensions obviously.
Also the above numbers are minimums, but
there is no max. Therefore the point (0D) type
would be a (malloced) array of N units and
everything else would be a linked list hierarchy
of depth N-1.

I.E.

1D = linked list of 0D obects
2D = linked list of 1D objects
: : :

Hmm I guess you could also represent 0D with
a linked list of N units for consistency?

Padraig.





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell