From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 07/26/2002 15:39:33
On Fri, 26 Jul 2002, Brian Cooper wrote:
Hi Brian,
The new viewer stuff is not based on the pfViewer architecture. That
being said, I suggest you remove that loop from pfViewer.C if you don't
want that restriction. If you are setting the view on the channels
yourself then this should not pose a problem (within libpfx
pfViewer::getView() is only called in one place, and you've found it.)
Or if you want to do something a little more involed ... you could
override the existing setView() method in pfViewer so that it looks like:
pfViewer::setView(int channelNo,pfCoord& view);
and store an array of values in lieu of just one. Then modify
pfViewer::getView() to do the same:
pfCoord& pfViewer::getView(int channelNo = 0);
after that's done, all you'll need to do is modify that for loop so that
it looks like:
for( ... )
viewer->getChannel(y)->setView(viewer->getView(y).xyz,
viewer->getView(y).hpr);
Once this is done, I suggest you call the pfViewer method for setting the
view in lieu of the method on pfChannel.
Last little note, nothing has changed in libpfx for 2.5.1, but if you
change it I'll check in the mods for the next release :)
A+,
Alex.
> Dear Performers,
>
> I am using a pfViewer to show multiple channels with the intention of
> having different views of our scenegraph set in each channel. I was
> unable to set the view per channel via
> view->getChannel(i)->setView(view.xyz, view.hpr); and can only set the
> view for the whole viewer. I then discovered this code in
> pfViewerManager.C at line 429 (in the simFrame method):
>
> for(y=0, numChannels = viewer->getNumChannels(); y<numChannels; y++)
> viewer->getChannel(y)->setView(viewer->getView().xyz,
> viewer->getView().hpr);
>
> This seems to blatantly override any per channel view setting that might
> have been done by the user, and forces all channels to one view. Short
> of hacking this and using my own custom pfViewerManager does anyone have
> a work around.
>
> After hearing of the new development in pfx (Siggraph), with
> manipulators etc, I am eager to get this new functionality but need to
> proceed with my current version asap. By the way I am using OpenGL
> Performer 2.5. Has this been changed at all in 2.5.1?
> Thanks,
>
> --
>
> Brian K. Cooper - Jet Propulsion Lab - Pasadena CA - (818)-354-6298
> brian.cooper++at++jpl.nasa.gov
>
> Signature in Stereo (free view, diverge eyes):
> X X
> ZKSCZFYKDXNLORWVZKSCZFYKDXNLORWVZKSCZFYKDXNLORWVZKSCZFYKDXNLORWVZKSCZFYKDXNLORWV
> FWAVBMYQCLXJRGNTFWABMYQCQLXJRGTFWHABMYQJLXJVRGTFHABMYUQCLXVRGTFHOABYUQCLXWVRGTFH
> GRTUFHNBDTZFQATQGRUFHNBDTRZFQTQGRUYFHNBTRZFQETQGUYFHNBQTRZQEHTQGUYFNBXQTZQXEHTQG
> UQPDMMSKSJDOXNCSUQDMSMSKSJDONCVSUDMRSMKSZJDNCNVSDMSRSKSSZJNCFNVSDMSSKLSSJNSCFNVS
> JBAHAWXSALESVWDBJBHALWXSALESWDSBJHAQLWSAPLEWDKSBHAIQLSAMPLWDKSBHDAILSAMPLJWDKSBH
> ZXDEIWQMWXOUWGUKZXEIKWQMWXOUGUMKZEIFKWMWJXOGUQMKEIFKWMIWJXGUWQMKEIFWMKIWXGYUWQMK
> NWIZZTYXXEHTUVRTNWZZTYXXEKHTURTNWZLZTYXEKHTUQRTNZLSZTYXEKHUQGRTNZLSTYAXEHUXQGRTN
> UHOMSMYSZWBYWWYVUHOSMYSZTWBYWWVUHEOSMYSZWBYEWWVUEIOSMYSZWBEWWVUEZIOMYASZBEFWWVUE
> UMTMEBOJVWXKQLIIUMTMEBOJVWXKQLIIUMTMEBOJVWXKQLIIUMTMEBOJVWXKQLIIUMTMEBOJVWXKQLII
>
This archive was generated by hypermail 2b29 : Fri Jul 26 2002 - 15:39:38 PDT