1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
/* SCCSid "$SunId$ SGI" */ |
4 |
|
|
10 |
|
|
11 |
|
extern struct driver { |
12 |
|
char *name; /* holodeck name or title */ |
13 |
< |
VIEW v; /* preferred view parameters */ |
14 |
< |
int hres, vres; /* device resolution */ |
13 |
> |
VIEW v; /* base view parameters */ |
14 |
> |
int hres, vres; /* base view resolution */ |
15 |
|
int ifd; /* input file descriptor (for select) */ |
16 |
|
} odev; /* our open device */ |
17 |
|
|
18 |
|
extern int imm_mode; /* bundles are being delivered immediately */ |
19 |
|
|
20 |
+ |
extern double eyesepdist; /* world eye separation distance */ |
21 |
+ |
|
22 |
|
/* user commands */ |
23 |
< |
#define DC_SETVIEW 0 /* set the view */ |
24 |
< |
#define DC_GETVIEW 1 /* print the current view */ |
23 |
> |
#define DC_SETVIEW 0 /* set the base view */ |
24 |
> |
#define DC_GETVIEW 1 /* print the current base view */ |
25 |
|
#define DC_LASTVIEW 2 /* restore previous view */ |
26 |
|
#define DC_PAUSE 3 /* pause the current calculation */ |
27 |
|
#define DC_RESUME 4 /* resume the calculation */ |
53 |
|
char *nm; : appropriate title bar annotation |
54 |
|
|
55 |
|
Sets fields of odev structure and prepares the display for i/o. |
56 |
< |
The view type, horizontal and vertical view angles and other default |
57 |
< |
parameters in odev.v should also be assigned. |
56 |
> |
The base view type, horizontal and vertical view angles and other |
57 |
> |
default parameters in odev.v should also be assigned. |
58 |
|
|
59 |
|
|
60 |
|
int |
61 |
< |
dev_view(nv) : set display view parameters |
61 |
> |
dev_view(nv) : set base view parameters |
62 |
|
VIEW *nv; : the new view |
63 |
|
|
64 |
< |
Updates the display for the given view change. |
64 |
> |
Updates the display for the given base view change. |
65 |
|
Look for nv==&odev.v when making view current after dev_input() |
66 |
|
returns DEV_NEWVIEW flag. Return 1 on success, or 0 if the |
67 |
|
new view would conflict with device requirements. In the latter |
101 |
|
If the DC_VIEW or DC_RESIZE flag is returned, the odev |
102 |
|
structure must be updated beforehand. |
103 |
|
|
104 |
+ |
void |
105 |
+ |
dev_auxcom(cmd, args) : process auxiliary command |
106 |
+ |
char *cmd, *args; : command name and argument string |
107 |
|
|
108 |
+ |
Execute an auxiliary command (not one of those listed at the head of |
109 |
+ |
this file). The cmd argument points to the command name itself, and |
110 |
+ |
the args argument points to a string with the rest of the input line. |
111 |
+ |
If the command isn't known or there ARE no auxiliary commands, print |
112 |
+ |
an appropriate COMMAND error message and return. |
113 |
+ |
|
114 |
+ |
|
115 |
+ |
VIEW * |
116 |
+ |
dev_auxview(n, hv) : return nth auxiliary view |
117 |
+ |
int n; : auxiliary view number |
118 |
+ |
int hv[2]; : returned horiz. and vert. image resolution |
119 |
+ |
|
120 |
+ |
Return the nth auxiliary view associated with the current base view. |
121 |
+ |
The hv entries are assigned the horizontal and vertical view resolution, |
122 |
+ |
respectively. Function returns NULL if there are no more auxiliary |
123 |
+ |
views. The zeroeth auxiliary view is the base view itself. |
124 |
+ |
|
125 |
+ |
|
126 |
|
void |
127 |
|
dev_close() : close the display |
128 |
|
|
131 |
|
|
132 |
|
|
133 |
|
************************************************************************/ |
134 |
+ |
|
135 |
+ |
|
136 |
+ |
extern VIEW *dev_auxview(); |