home *** CD-ROM | disk | FTP | other *** search
- #
- # Some simple tests of running clients.
- #
-
- Client = "xmtdrvs -s-";
- if ( machine == ibmos2, Client = "os2drvs -s-" );
- if ( machine == ibmnt, Client = "wntdrvs -s-" );
- if ( machine == sgi, Client = "xgldrvs -s-" );
-
- printf( "Executing Client \"%s\"", list( Client ) );
-
- h1 = clntexec( Client );
-
- clntwrite( h1, axes );
- clntwrite( h1, sphere( vector( 0, 0, 0 ), 0.6 ) );
-
- h2 = clntexec( Client );
-
- s45 = sqrt(2) / 2;
- halfcirc = cbspline( 3,
- list( ctlpt( P3, 1.0, 0.0, 0.0, 1.0 ),
- ctlpt( P3, s45, -s45, 0.0, s45 ),
- ctlpt( P3, 1.0, -1.0, 0.0, 0.0 ),
- ctlpt( P3, s45, -s45, 0.0, -s45 ),
- ctlpt( P3, 1.0, 0.0, 0.0, -1.0 ) ),
- list( 0, 0, 0, 1, 1, 2, 2, 2 ) );
- color( halfcirc, white );
-
- sp = surfrev( halfcirc * sc( 0.6 ) );
-
- clntwrite( h2, axes );
- clntwrite( h2, sp );
-
- pause();
-
- clntclose( h1, true );
-
- obj1 = clntgetobj( h2, "axes" ); # Do write and read - a macro in iritinit.irt
- obj2 = clntgetobj( h2, "sp" ); # Do write and read - a macro in iritinit.irt
-
- iritstate( "dumplevel", 9 );
- obj1;
- obj2;
- iritstate( "dumplevel", 1 );
-
- h3 = clntexec( "nuldrvs -s- -d" );
- clntwrite( h3, obj1 );
- clntwrite( h3, obj2 );
- pause();
- clntclose( h3, true );
-
- obj3 = clntread( h2, 1000 ); # No data - timeout after 1 second.
-
- h4 = clntexec( "" );
- clntwrite( h4, obj1 );
- clntwrite( h4, obj2 );
- pause();
- clntclose( h4, true );
-
- pause();
- clntclose( h2, true );
-