Re: [Plib-devel] proper plib coding example
Brought to you by:
sjbaker
From: <br...@sa...> - 2005-02-26 17:00:14
|
> > Yeah - but there can be problems with some applications. Very often, > I'll position the camera very carefully so that you aren't intersecting > adjacent walls, etc. If you allow the user to (in effect) alter the > field of view - then other things may go wrong. In particular, it's > possible that on-screen iconography will disappear off the top or > bottom of the screen. In the case of the viewer app, iconography can only disappear left/right from the screen, due to the implementation: Currently, I implemented it so that vertical fov is always fixed, and horizontal fov is adapted to aspect ratio. > I think that what most 3D applications truly need is to have the > user's choice of screen size be used by the application to set only > the WIDTH of the screen - and as he drags the window around, to > force the window dimensions such that the pixels remain square *and* > the horizontal and vertical fields of view are maintained. I think this is impossible, you could only maintain minimal fov vals, you cannot fix them and keep aspect ratio the same while user drags. (unless you disable non-linear window scaling). In the method I described above, vertical fov is garantueed. I can imagine an algorithm that will guarantee minimal values for fov-y and fov-x, will increase fov in one of the two dirs. As I have it now, fov-x can both decrease and increase from start setting. But I agree with you that desired behaviour depends on the app, although a varying aspect ratio seems bad to me for most cases. There are also cases where you may want to derive fov-xy directly from window size, so that increasing windowsize will let you see more of your model (a ppe window comes to mind). bram PS: The only plib app I could find that keeps aspects correct was ppe, but this was because ppe uses the opengl widget from FLTK, which properly recalculates frustums. > ---------------------------- Steve Baker ------------------------- > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > HomePage : http://www.sjbaker.org > Projects : http://plib.sf.net http://tuxaqfh.sf.net > http://tuxkart.sf.net http://prettypoly.sf.net > -----BEGIN GEEK CODE BLOCK----- > GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ > -----END GEEK CODE BLOCK----- > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > plib-devel mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-devel > |