Jump to content
  • Advertisement


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


Automatic Scaling of .X File

This topic is 5457 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 gang. As I am learning D3D, I have been playing around with the MeshView program to load and view models from .X files. No matter the scale of the model loaded the program does a good job of fitting the model to the view screen. When I load new models from a .X file with my code I have to play around with the z component of the models world coordinates in order to see it at the proper size (e.g. some models initially load up really small and have to be brought forward with a lower z component). How does the MeshView program know how to scale the model? Thanks Todd

Share this post

Link to post
Share on other sites
It calculates the model size from it''s bounding box (minimum and maximum positions of the vertices), if i remember correctly.
I''m not on my own machine right now to verify this, but the meshview source code is published in the sdk, browse thru it to find the definitive answer.


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.

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!