Setting Up the Scene Classes

[ LiB ]

Setting Up the Scene Classes

The scene classes are critical to the scene definition file. You need to write a few methods to read in the camera, lights, materials, spheres, and triangles .

The data in the files can be listed in random order and you can have n amount of lights, spheres, and triangles. When this data is read in, it is stored in the light and object arrays. You are going to declare three variables . One variable will be used to determine whether data has been loaded into the scene from a file called isDataReady . The other two variables track the number of triangles and spheres that are read into the scene. These variables are declared in the cScene class.

Here is the declaration:

 bool     isDataReady; long     triangle_count,          sphere_count; 

[ LiB ]


Focus On Photon Mapping
Focus On Photon Mapping (Premier Press Game Development)
ISBN: 1592000088
EAN: 2147483647
Year: 2005
Pages: 128
Authors: Marlon John

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net