NOTE: This is not to be handed in. This is just if you want to get started early on code you going to have to write at some point anyway. This should not be a difficult exercise. If you have problems writing this code, then you should see me about what classes you should be taking.
ASSIGNMENT:
Write a parser for an input text scene description file(see format below), reading in values and setting variables in a scene description data structure.
Data Structure
Set up data structures for the following items. The variables in the data structures are the ones that are in the input file (see below).
Simple Scene File Format
bracketed values are floats unless they end in:
'_i' : integer '_s' : non-whitespace string '_ws': text with whitespace terminated by the end of line
# <comment_ws> sphere <x> <y> <z> <radius> <r> <g> <b> <kd> camera <x> <y> <z> <cx> <cy> <cz> <angle> <aspect> <hither> <yon> <tilt> <xres_i> <yres_i> ambient <a> background <r> <g> <b> output <filename_s> identity rotate [x|y|z] <angle> translate <tx> <ty> <tz> scale <sx> <sy> <sz>