1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
|
/* |
5 |
|
3DS2POV.C Copyright (c) 1996 Steve Anger and Jeff Bowermaster |
6 |
|
MGF output added by Greg Ward |
13 |
|
Compiled with MSDOS GNU C++ 2.4.1 or generic ANSI-C compiler |
14 |
|
*/ |
15 |
|
|
13 |
– |
#ifndef lint |
14 |
– |
static char SCCSid[] = "$SunId$ LBL"; |
15 |
– |
#endif |
16 |
– |
|
16 |
|
#include <stdio.h> |
17 |
|
#include <stdlib.h> |
18 |
|
#include <math.h> |
46 |
|
#define MGF 4 |
47 |
|
#define RAW 99 |
48 |
|
|
49 |
< |
#define DEG(x) ((180.0/M_PI)*(x)) |
50 |
< |
#define RAD(x) ((M_PI/180.0)*(x)) |
49 |
> |
#define DEG(x) ((double)(180.0/M_PI)*(x)) |
50 |
> |
#define RAD(x) ((double)(M_PI/180.0)*(x)) |
51 |
|
|
52 |
|
#ifndef M_PI |
53 |
|
#define M_PI (3.14159265358979323846) |
350 |
|
float findfov (float lens); |
351 |
|
int read_mgfmatname (char *s, int n, FILE *f); |
352 |
|
|
353 |
+ |
char *progname; |
354 |
|
|
355 |
+ |
|
356 |
|
int main (int argc, char *argv[]) |
357 |
|
{ |
358 |
|
char meshfname[128]; |
454 |
|
void process_args (int argc, char *argv[]) |
455 |
|
{ |
456 |
|
int i; |
456 |
– |
char *progname; |
457 |
|
char *env_opt, *option; |
458 |
|
|
459 |
|
printf("\n\nAutodesk 3D Studio to Raytracer file Translator. Feb/96\n"); |
2376 |
|
|
2377 |
|
do { |
2378 |
|
start_chunk (&chunk); |
2379 |
< |
|
2379 |
> |
if (feof(in)) { |
2380 |
> |
fprintf(stderr, "%s: unexpected EOF\n", progname); |
2381 |
> |
break; |
2382 |
> |
} |
2383 |
|
if (chunk.end <= mainchunk->end) { |
2384 |
|
switch (chunk.tag) { |
2385 |
|
case 0x3D3D: parse_mdata (&chunk); |