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

3D Object Class

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

I''m working with DirectX 8.0 and I''ve gotten far enough to where I need my engine to be able to load 3D objects into memory instead of using ones that I''ve defined inside the code. The problem I''m coming across is that I am at a serious loss for an idea of how to set up my objects so they dont take up too much memory. For instance, if I''m making an object class that can have up to 30 polygons in it with up to 10 triangles per polygon and a max of 4 textures per object, I might make a set of 2 arrays, 1 defined as Polygon indexedpolygon [30] and 1 defined as Texture indexedtexture [4]. My polygon class would then have to have an array of triangles defined as Primitive indexedprimitive [10]. Anyway, If i were to use these classes in my engine to define an object. I would be wasting a LOT of memory. All objects would require the same amount of space which would be the amount required for the most complicated possible object. It would also waste processor resources to calculate for all those null indexes. Can anyone tell me how I''m going about this wrong and what I should do to fix it? ~Vendayan

Share this post

Link to post
Share on other sites