object managment? how?

Started by
6 comments, last by youngo 24 years ago
object managment? how? are there any tutorials that explain how to manage 3d objects? particually with d3dim?
Advertisement
You are not really handling objects. You are just handling an array of verticies and transforming with matricies. Along with transforming(which you can do or DX) you must pass the object(or array) to drawprimitive.
how?
You should research DirectX more.
You could develop a class hierarchy that handles the object stuff for you... but if you don''t know the basics that will be tough to implement and you''ll need to really work through some of the examples in the DirectX7 SDK (and the rest of the documentation) until you are comforable with D3DIM. If you already are and are just haveing a problem with something specific, just say what and I''m sure someone can clarify it for you

Check out the GPI project today!
Hi,
in my current engine I have two structures :

typedef struct TObjectMesh{  TVertices *Verts;  TTexture *Tex;  TPhysics *Physics;  ...} TObjectMesh;typedef struct TObject{   TVector3D Translation;  TVector3D Rotation;  ...  TObjectMesh *Object;} TObject; 


Now you need to have the model in the memory and let the pointer from TObject point onto the specific mesh. Now you should sort the objects being rendered in the specific frame by textures to avoid unnecessary texture uploads (sloooooow).

And that''s it.

CU

Graphix Coding @
Skullpture Entertainment
http://www.skullpture.de
Graphix Coding @Skullpture Entertainmenthttp://www.skullpture.de
quote:Original post by nes8bit

You should research DirectX more.


I think this is unfair. This is not about how to call the functions, more about a way to store the entire world in a logical way, which is not gonna work just as one long line of vertices!

One way would be storing a position, rotation, list of vertices and a list of polygons (accessing those vertices via an index perhaps) as part of an ''Object'' class. And your ''World'' class could contain a list of Objects. Overly simple, I know, but from there you can look into ways of subdividing your ''World'' class to only render certain Objects, etc etc.
If you are looking for quick and easy, the post with the code works great, if you are looking for speed, you will definately need to look into higher-order data structures like quadtrees, binary search trees, linked lists, etc..

Bworks.Com

This topic is closed to new replies.

Advertisement