| 170 |
|
*/ |
| 171 |
|
|
| 172 |
|
#ifdef SMLFLT |
| 173 |
< |
#define FLOAT float |
| 173 |
> |
#define RREAL float |
| 174 |
|
#define FTINY (1e-3) |
| 175 |
|
#else |
| 176 |
< |
#define FLOAT double |
| 176 |
> |
#define RREAL double |
| 177 |
|
#define FTINY (1e-6) |
| 178 |
|
#endif |
| 179 |
|
#define FHUGE (1e10) |
| 180 |
|
|
| 181 |
< |
typedef FLOAT FVECT[3]; |
| 181 |
> |
typedef RREAL FVECT[3]; |
| 182 |
|
|
| 183 |
|
#define VCOPY(v1,v2) ((v1)[0]=(v2)[0],(v1)[1]=(v2)[1],(v1)[2]=(v2)[2]) |
| 184 |
|
#define DOT(v1,v2) ((v1)[0]*(v2)[0]+(v1)[1]*(v2)[1]+(v1)[2]*(v2)[2]) |
| 295 |
|
* Definitions for hierarchical transformation handler |
| 296 |
|
*/ |
| 297 |
|
|
| 298 |
< |
typedef FLOAT MAT4[4][4]; |
| 298 |
> |
typedef RREAL MAT4[4][4]; |
| 299 |
|
|
| 300 |
|
#ifdef BSD |
| 301 |
|
#define copymat4(m4a,m4b) bcopy((char *)m4b,(char *)m4a,sizeof(MAT4)) |
| 313 |
|
/* regular transformation */ |
| 314 |
|
typedef struct { |
| 315 |
|
MAT4 xfm; /* transform matrix */ |
| 316 |
< |
FLOAT sca; /* scalefactor */ |
| 316 |
> |
RREAL sca; /* scalefactor */ |
| 317 |
|
} XF; |
| 318 |
|
|
| 319 |
|
#define identxf(xp) (void)(setident4((xp)->xfm),(xp)->sca=1.0) |