2501 |
|
.NH |
2502 |
|
MGF Translators |
2503 |
|
.LP |
2504 |
< |
Initially, there are four translators for MGF data, but only |
2505 |
< |
one of these is distributed with the MGF parser itself, |
2506 |
< |
.I mgfilt. |
2504 |
> |
Initially, there are five translators for MGF data, but only |
2505 |
> |
two of these are distributed with the MGF parser itself, |
2506 |
> |
.I mgfilt |
2507 |
> |
and |
2508 |
> |
.I mgf2inv. |
2509 |
|
Two of the other translators, |
2510 |
|
.I mgf2rad |
2511 |
|
and |
2518 |
|
nestor.epfl.ch, or by WWW from |
2519 |
|
"http://radsite.lbl.gov/radiance/HOME.html" |
2520 |
|
.FE |
2521 |
< |
A third translator, |
2521 |
> |
The fifth translator, |
2522 |
|
.I mgf2meta, |
2523 |
|
converts to a 2-dimensional line plot, and is also |
2524 |
|
distributed with Radiance. |
2535 |
|
In future releases of MGF, this utility will also be handy for |
2536 |
|
taking new entities and producing older versions of MGF for |
2537 |
|
translators that have not yet been updated properly. |
2538 |
+ |
.LP |
2539 |
+ |
Mgf2inv converts from MGF to Inventor or VRML format. |
2540 |
+ |
Some information is lost, because these formats do not support |
2541 |
+ |
physical light sources or materials. |
2542 |
|
.ds LH Translators |
2543 |
|
.ds RH MGFILT |
2544 |
|
.bp |
2601 |
|
.SH |
2602 |
|
SEE ALSO |
2603 |
|
.LP |
2604 |
< |
i, mgf2rad, rad2mgf |
2604 |
> |
i, mgf2inv, mgf2rad, rad2mgf |
2605 |
> |
.ds RH MGF2INV |
2606 |
> |
.bp |
2607 |
> |
.SH |
2608 |
> |
NAME |
2609 |
> |
.LP |
2610 |
> |
mgf2inv - convert from MGF to Inventor or VRML format |
2611 |
> |
.SH |
2612 |
> |
SYNOPSIS |
2613 |
> |
.LP |
2614 |
> |
.B mgf2inv |
2615 |
> |
[ |
2616 |
> |
.B "-1|-2|-vrml" |
2617 |
> |
] |
2618 |
> |
[ |
2619 |
> |
.B input .. |
2620 |
> |
] |
2621 |
> |
.SH |
2622 |
> |
DESCRIPTION |
2623 |
> |
.LP |
2624 |
> |
.I Mgf2inv |
2625 |
> |
takes one or more MGF input files and converts it to |
2626 |
> |
Inventor or VRML format. |
2627 |
> |
If the |
2628 |
> |
.I \-1 |
2629 |
> |
option is used, then Inventor 1.0 ASCII output is produced. |
2630 |
> |
If the |
2631 |
> |
.I \-2 |
2632 |
> |
option is used, then Inventor 2.0 ASCII output is produced. |
2633 |
> |
(This is the default.)\0 |
2634 |
> |
If the |
2635 |
> |
.I \-vrml |
2636 |
> |
option is used, then VRML 1.0 ASCII output is produced. |
2637 |
> |
.LP |
2638 |
> |
This converter does not work properly for light sources, since |
2639 |
> |
the output formats do not support IES-type luminaires with recorded |
2640 |
> |
distributions. |
2641 |
> |
Also, some material information may be lost because Inventor lacks |
2642 |
> |
a physically valid reflectance model. |
2643 |
> |
.SH |
2644 |
> |
EXAMPLES |
2645 |
> |
.LP |
2646 |
> |
To take an MGF file and convert it to VRML format: |
2647 |
> |
.IP |
2648 |
> |
mgf2inv -vrml myscene.mgf > myscene.iv |
2649 |
> |
.SH |
2650 |
> |
SEE ALSO |
2651 |
> |
.LP |
2652 |
> |
mgf2rad, mgfilt, rad2mgf |
2653 |
|
.ds RH MGF2RAD |
2654 |
|
.bp |
2655 |
|
.SH |
3332 |
|
#define MG_ESEEK 9 /* file seek error */ |
3333 |
|
#define MG_EBADMAT 10 /* bad material specification */ |
3334 |
|
#define MG_ELINE 11 /* input line too long */ |
3335 |
+ |
#define MG_ECNTXT 12 /* unmatched context close */ |
3336 |
|
|
3337 |
< |
#define MG_NERRS 12 |
3337 |
> |
#define MG_NERRS 13 |
3338 |
|
.DE |
3339 |
|
If it is inappropriate to send output to standard error, the calling |
3340 |
|
program should use the routines listed under |
3418 |
|
function reads the next input line from the current file, |
3419 |
|
returning the number of characters in the line, or zero if the |
3420 |
|
end of file is reached or there is a file error. |
3421 |
< |
If the last character read in the input line is not a newline, |
3421 |
> |
If the value returned equals MG_MAXLINE-1, |
3422 |
|
then the input line was too long, and you |
3423 |
|
should return an MG_ELINE error. |
3424 |
< |
The function skips over escaped newlines, and keeps track of the |
3424 |
> |
The function keeps track of the |
3425 |
|
line number in the current file context |
3426 |
|
.I mg_file, |
3427 |
|
which also contains the line that was read. |