Jump to content
  • Advertisement
Sign in to follow this  
ronkelly

efficient data structures

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

Hey guys, If anyone could guide me in the right direction to what would be an efficient data structure to model these types of things that would be great. 1) a complex polygonal model (like a ship or building) 2) organic shapes (like a head or a plasticine figure) 3) primitive data objects (like spheres, cones, etc.) thanks a billion!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by ronkelly
If anyone could guide me in the right direction to what would be an efficient data structure to model these types of things that would be great.

It's often possible to have multiple valid algorithms/structures depending on what the eventual use is. Do you need to optimize for fast insertion/removal? do you need dynamic storage? etc...

Quote:
Original post by ronkelly
1) a complex polygonal model (like a ship or building)

Probably a list of vertices and indices, stored heirachically or in groups. Then again, that's pretty much based on my usage of the D3DX environment [smile]

Quote:
Original post by ronkelly
2) organic shapes (like a head or a plasticine figure)

parametric/higher-order surfaces seem to be popular for this sort of thing. Look up NURBS/NURMS and see what you think.

Quote:
Original post by ronkelly
3) primitive data objects (like spheres, cones, etc.)

Could use either of the above two options here. Some of the primitive objects can be wholly expressed as mathematical functions, others might well benefit from being pre-generated polygonal groups.

Might be easier to suggest specifics if you say what/how you want to use them.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by ronkelly
Hey guys,

If anyone could guide me in the right direction to what would be an efficient data structure to model these types of things that would be great.


I'm assuming here you'll trying to get reasonable looking models at reasonib;e rendering speed.

Quote:

1) a complex polygonal model (like a ship or building)


a vertex array or an indexed vertex array as they are easy to go through and render and can give you the shape realistically

Quote:

2) organic shapes (like a head or a plasticine figure)


I agree with jollyjeffers about using NURBS/NURMS. Just store the control points for them.

Quote:

3) primitive data objects (like spheres, cones, etc.)


Just store the values you need to beable to recreate the object eg. centre point, radius, height


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!