Jump to content
  • Advertisement
Sign in to follow this  
Sammy0037

models and variables

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

Hi Im in the process of updating an old program and have been reading examples of using MD3. All of them seem to be set up for a single instance, typically the player. But not 2,3 or 50. Im curious where to keep things such as location, rotation, and rendering + matrix functions... the model class or the controller that takes care of them all? My best guess is to have two lists. The first keeps one copy of each model only, and the second holds the multiple copies that keeps track of everything else. Then have each one in the second point to the appropriate model in the first. Seems logical. Or is there another way? Cheers

Share this post


Link to post
Share on other sites
Advertisement
You basically want two classes. One that holds all the model data (i.e. all the vertex info, bones etc) and another that holds per instance data (animation state, transformation matrix etc). You may also want to write a resource manager class that ensures you only ever load one version of the model data (no point loading in a model twice when you can just get a pointer to a previously loaded version).

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!