Archived

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

Automatic Scaling of .X File

This topic is 5173 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.

-Nik

Share this post


Link to post
Share on other sites