1 |
– |
/* Copyright (c) 1990 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* xf.c - routines to convert transform arguments into 4X4 matrix. |
6 |
|
* |
7 |
< |
* 1/28/86 |
7 |
> |
* External symbols declared in rtmath.h |
8 |
|
*/ |
9 |
|
|
10 |
< |
#include "standard.h" |
10 |
> |
#include <stdlib.h> |
11 |
> |
#include "rtmath.h" |
12 |
> |
#include "rtio.h" |
13 |
|
|
14 |
|
#define d2r(a) ((PI/180.)*(a)) |
15 |
|
|
22 |
|
int ac; |
23 |
|
char *av[]; |
24 |
|
{ |
26 |
– |
double atof(), sin(), cos(); |
25 |
|
MAT4 xfmat, m4; |
26 |
|
double xfsca, dtmp; |
27 |
|
int i, icnt; |
67 |
|
m4[1][0] = -(m4[0][1] = sin(dtmp)); |
68 |
|
break; |
69 |
|
default: |
70 |
< |
return(i); |
70 |
> |
goto done; |
71 |
|
} |
72 |
|
break; |
73 |
|
|
100 |
|
m4[2][2] = -1.0; |
101 |
|
break; |
102 |
|
default: |
103 |
< |
return(i); |
103 |
> |
goto done; |
104 |
|
} |
105 |
|
break; |
106 |
|
|
116 |
|
continue; |
117 |
|
|
118 |
|
default: |
119 |
< |
return(i); |
119 |
> |
goto done; |
120 |
|
|
121 |
|
} |
122 |
|
multmat4(xfmat, xfmat, m4); |
136 |
|
int ac; |
137 |
|
char *av[]; |
138 |
|
{ |
141 |
– |
double atof(), sin(), cos(); |
139 |
|
MAT4 xfmat, m4; |
140 |
|
double xfsca, dtmp; |
141 |
|
int i, icnt; |
181 |
|
m4[1][0] = -(m4[0][1] = sin(dtmp)); |
182 |
|
break; |
183 |
|
default: |
184 |
< |
return(i); |
184 |
> |
goto done; |
185 |
|
} |
186 |
|
break; |
187 |
|
|
214 |
|
m4[2][2] = -1.0; |
215 |
|
break; |
216 |
|
default: |
217 |
< |
return(i); |
217 |
> |
goto done; |
218 |
|
} |
219 |
|
break; |
220 |
|
|
230 |
|
break; |
231 |
|
|
232 |
|
default: |
233 |
< |
return(i); |
233 |
> |
goto done; |
234 |
|
|
235 |
|
} |
236 |
|
multmat4(xfmat, m4, xfmat); /* left multiply */ |