Re: Relating Pixel and Model Space
- From: parks <donovan.parks@xxxxxxxxx>
- Date: Sat, 18 Oct 2008 04:53:31 -0700 (PDT)
Hello Jon,
I certainly agree it is ugly and not very helpful. Why do you think I
should play around with the aspect ratio m_aspect. Should this not be
set to the aspect ratio of ones OpenGL viewport (window)? Thus it is
variable, but controlled by the window size. Similarily, I am actually
interested in loading in different maps so the mapAspect is variable,
but again not something I can play with. I would think the only free
variable here is the camera's Z position and that there should be some
*simple* formula to calculate it. I can't imagine other people haven't
wanted to do this and am surprised someone has just jumped in with a
straight forward solution.
Cheers,
Donovan
To me that's ugly in the extreme, especially given that you don't know
why it works.
I'd like to see the value of m_aspect. Indeed, I'd start off with it at
1.0 and get to the situation where you get the desired fit in the
y-direction. After that you can adjust it (m_aspect) appropriately and
then think about why the value that works is successful.
Try a simple trace (print out values using printf or cout).
Best regards,
Jon C.
.
- Follow-Ups:
- Re: Relating Pixel and Model Space
- From: Jonathan Campbell
- Re: Relating Pixel and Model Space
- References:
- Re: Relating Pixel and Model Space
- From: fungus
- Re: Relating Pixel and Model Space
- From: parks
- Re: Relating Pixel and Model Space
- From: Jonathan Campbell
- Re: Relating Pixel and Model Space
- From: parks
- Re: Relating Pixel and Model Space
- From: Jonathan Campbell
- Re: Relating Pixel and Model Space
- From: parks
- Re: Relating Pixel and Model Space
- From: Jonathan Campbell
- Re: Relating Pixel and Model Space
- Prev by Date: Re: Driver crashes on GeForce 9500GT (Windows Vista machine)
- Next by Date: Re: Relating Pixel and Model Space
- Previous by thread: Re: Relating Pixel and Model Space
- Next by thread: Re: Relating Pixel and Model Space
- Index(es):
Relevant Pages
|