Focus On Photon Mapping (Premier Press Game Development)

[ 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 ]

Категории