[Solved] Showing the FOV & TILT on a panorama:

  • Goog morning everybody,

    What kind of code I have to insert in my xml to get a little window showing the FOV (degrees) inside a panorama?

    Thanks a lot for your help *wink*

    Edited 3 times, last by Boubou (May 18, 2011 at 5:42 PM).

  • Code
    <events onviewchange="showfovtext();" />
       <textstyle name="FOVTEXT" origin="bottom" edge="top" yoffset="190" textalign="center" background="false" border="false" fontsize="20" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="2.0" fadetime="1.0" />
       <action name="showfovtext">
      	copy(fov,view.hfov);
      	roundval(fov,2);
    	  txtadd(msg,'HFOV=',get(fov),'°');
    	  showtext(get(msg),FOVTEXT);
       </action>

    Thanks a lot to those how helped me on Panophoto

  • "<action name="showfovtext">
    copy(fov,view.hfov);
    roundval(fov,2);
    txtadd(msg,'HFOV=',get(fov),'°');
    showtext(get(msg),FOVTEXT);
    </action>"

    does that work have you tested it? i dont think hfov is valid. this is what the view tag supports i dont see hfov.

    <view hlookat="0.0"
    vlookat="0.0"
    camroll="0.0"
    fovtype="VFOV"
    fov="90.0"
    fovmin="1.0"
    fovmax="179.0"
    maxpixelzoom=""
    fisheye="0.0"
    fisheyefovlink="0.5"
    limitfov="true"
    stereographic="false"
    pannini="false"
    architectural="0.0"
    architecturalonlymiddle="false"
    limitview="auto"
    hlookatmin=""
    hlookatmax=""
    vlookatmin=""
    vlookatmax=""
    />

    the below action should work but it is not tested.

    "<action name="showfov_tilt">
    copy(fov,view.fov);
    copy(tilt,view.vlookat);
    roundval(fov,2);
    roundval(tilt,2);
    txtadd(msg,'FOV=',get(fov),'°+ TILT='get(tilt),'°');

    showtext(get(msg),FOVTEXT);

    </action>"

  • "<action name="showfovtext">
    copy(fov,view.hfov);
    roundval(fov,2);
    txtadd(msg,'HFOV=',get(fov),'°');
    showtext(get(msg),FOVTEXT);
    </action>"

    does that work have you tested it? i dont think hfov is valid. this is what the view tag supports i dont see hfov.

    Like discussed on Panophoto.org, hfov and hlookat are the two main attributes used in radar algorythm (see the code)
    to manage horizontal size and orientation.

    For fun I have modified the code to manage a vertical radar...
    It is running...
    But it should combine the two rotations : horizontal and veritcal to draw the more realistic "radar".

  • Just a little change and now it's works perfectly *thumbsup*

    Code
    <action name="showfov_tilt">
    copy(fov,view.hfov);
    copy(tilt,view.vlookat);
    roundval(fov,2);
    roundval(tilt,2);
    txtadd(msg,'HFOV=',get(fov),'°+ TILT=',get(tilt),'°');
    showtext(get(msg),FOVTEXT);
    </action>

    Edited 2 times, last by Boubou (May 24, 2011 at 12:17 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!