Function:ss2sess

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 03:56, 22 November 2007
S2plot admin (Talk | contribs)

← Previous diff
Current revision
S2plot admin (Talk | contribs)


Current revision

ss2sess

Set the eye separation multiplier.

Prototype

void ss2sess(float ieyesep);

Description

Sets the value of the eye separation multiplier. Only use if the default stereo settings are too extreme to be comfortable for extended viewing.

See Also

ss2qess Get the eye separation multiplier


Code Example

#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"

void cb(double *t, int *kc)
{
   float qss = ss2qess();               /* Query current eye-separation */

   char string[32];                     
   sprintf(string,"Eye separation = %.2f",qss); /* Write to string */
   s2textxy(0,0,0,string);              /* Display text */

   float ess = (float)((*kc%10))/10.0;  /* Calculate new eye-separation */
   ss2sess(ess);                        /* Set the new eye-separation */
   
}

int main(int argc, char *argv[])
{
   fprintf(stderr,"Press the <spacebar> to change eye-separation");

   s2opend("/s2dsana", argc, argv);             /* Open in anaglyph mode */
   s2swin(-1.,1., -1.,1., -1.,1.);              /* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);  /* Draw coordinate box */
   
   cs2scb(cb);                                  /* Install dynamic callback */
   s2show(1);                                   /* Open the s2plot window */

   return 1;
}

Back to S2PLOT function list.


Personal tools