Jump to content
  • Advertisement

Archived

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

Vendayan

3D Object Classes

This topic is 6084 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 pretty new to 3D game programming and i was wondering if anyone could give me a basic example of a 3D object class? I really dont need to know all the code in any methds, I just need to have something to give me an idea of how i need to store my objects in model space and worldspace. Please give me as much help as possible, I''m at a real loss here. ~Vendayan

Share this post


Link to post
Share on other sites
Advertisement
Well Im actually trying to learn how to make a 3D engine from the ground up, although I understand most of what needs to be done. Im simply wondering what would be the best way to make the class for objects, and a type of hierarchy for them as well. I know the DirectX functions well enough and Ive read shelves of books full about them, but for some reason I still cant see the best way to set up the class. I also have a good feeling that it may be all that I need to know to actually start some serious work on my app.

~Vendayan

Share this post


Link to post
Share on other sites
Hi,

I think that small static objects aren''t any problem, because you can just load them (Of course, you need to know which file format you want to implement), store them in a vertex array (or vertex buffer, in DX terms) and push them onto you graphics board.

Do you want to use some sorting-techniques such as BSP-Trees, Octrees, etc., or do you want to draw some simple objects in the beginning? Thats a bit more complex...

Share this post


Link to post
Share on other sites
Huh...?

Ok im somewhat new to this, If I have an example of how I should store my primitives in the form of an object I can very easily find my own efficient way of rendering them, I simply need an idea of a class that would let me store me store all the information and some of the methods I will need.

For instance I''m not entirely sure if I should use a VB for each primitive or each object, and for that matter if I should really use them at all. I would also like to include a function for calculating bounding spheres, tht would be called whenever the object would animate itself or be scaled / stretched etc. I am also not entirely sure how I should go about storing objects in model space and moving them into world space.

Like I said, I''m at a complete loss here

~Vendayan

Share this post


Link to post
Share on other sites
That didnt really help much, I looked at the code they had but it was nothing like what im looking for. I am just looking for something that would tell me how to set up the vertex buffers for the objects and how to use them.

I have also been wondering if anyone could answer this simple question for me - If you are defining primitives by indexes then how do you give each vertex all the different texture coordinates it will need for the different primitives that it makes.

~Vendayan

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!