parsing rad scenes and small typo in rad2mgf

Hi,

I am currently searching for a way to parse rad scenes. I found trans.h (and
the readme in translators), and as an example rad2mgf. Is there anything
like a generic parser (there is something like that for mgf, with functions
that have just to be overwritten)? OT: Is there a parser class in Radzilla?

And than I found some message about rat2mgf in rad2mgf.c... maybe one of the
cvs-writers can correct it :wink:

Best wishes for the new year! Lars

Hi Lars,

Radiance scene files were really meant to be read with scanf() and written with printf(). If you want help with the loading of arguments, I suggest using the routine in src/common/readfargs.c, and fgetword() and fputword() for the modifiers and identifiers.

I hope this helps!
-Greg

P.S. Your letter prompted me to fix not only the misspelling in rad2mgf, but also the reading and writing of id's with spaces in them, which are discouraged even though they're allowed in Ratiance.

···

From: "Lars Grobe" <[email protected]>
Date: December 27, 2005 11:47:06 PM PST

Hi,

I am currently searching for a way to parse rad scenes. I found trans.h (and
the readme in translators), and as an example rad2mgf. Is there anything
like a generic parser (there is something like that for mgf, with functions
that have just to be overwritten)? OT: Is there a parser class in Radzilla?

And than I found some message about rat2mgf in rad2mgf.c... maybe one of the
cvs-writers can correct it :wink:

Best wishes for the new year! Lars