Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Load mesh

majcmajc Member Posts: 7
I want to load a mesh and center it in the screen but i dont know how, i dont know how i can retrieve the coordinates of the mesh when i load it.
If someone could put an exemple of code instead of simple talking.
Thx in advance.

Comments

  • Srki_KiSrki_Ki Member Posts: 26
    : I want to load a mesh and center it in the screen but i dont know how, i dont know how i can retrieve the coordinates of the mesh when i load it.
    : If someone could put an exemple of code instead of simple talking.
    : Thx in advance.
    :
    I'll just talk :) You allready know how to load a mesh, don't you? When a mesh is loaded, calculate bounding sphere. You will have center and radius of sphere. All you got to do is to translate object so it's center is at 0,0,0 and set camera at 0,0,-2*sphere_radius looking at 0,0,0. That's it! :)
  • majcmajc Member Posts: 7
    Thx man for your help!!
Sign In or Register to comment.