Function:ss2qss

From S2PLOT

Jump to: navigation, search

ss2qss

Get the spin / interaction speed

Prototype

float ss2qss();

Description

Get the current spin/interaction speed.

See Also

ss2sss Set the spin / interaction speed
ss2sas Start/Stop the camera rotation.


Code Example

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

int main(int argc, char *argv[])
{
   XYZ xyz = { 0.0, 0.0, 0.0 };			/* Position */
   XYZ right = { 0.05, 0.0, 0.0 };		/* Right vector */
   XYZ up = { 0.0, 0.05, 0.0 };			/* Up vector */
   COLOUR col = { 1.0, 1.0, 0.0 };		/* Colour */
   char text[32];				/* Text */
   float sp = 5.0;				/* Speed */

   s2opend("/?",argc, argv);			/* Open the display */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);	/* Draw coordinate box */

   sp = ss2qss();				/* Get spin speed */
   sprintf(text,"Speed = %5.2f",sp);		/* Prepare the text */
   ns2vtext(xyz, right, up, col, text);		/* Right some text */
  
   ss2sas(1);					/* Start camera rotating */

   s2show(1);					/* Open the s2plot window */
   
   return 1;
}

Back to S2PLOT function list.


Personal tools