home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / graphicgems4.lha / GemsIV / vec_mat / ray / Scene3D.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-06  |  1.1 KB  |  35 lines

  1. /************************************************************************
  2. *                                    *
  3. * CLASS: Scene3D                            *
  4. * AUTHOR: Jean-Francois DOUE                        *
  5. * LAST MODIFICATION: 12 Oct 1993                    *
  6. *                                    *
  7. * This class implements a 3D scene.                    *
  8. * The scene is composed of a camera, a collection of light sources    *
  9. * and a collection of primitives to render.                *
  10. * The scene is capable of ray-tracing itself.                *
  11. * Scenes are typically parsed from a text file description. (see the    *
  12. * README file for a description of the format).                *
  13. *                                    *
  14. ************************************************************************/
  15.  
  16. #include "Camera.h"
  17. #include "Light.h"
  18. #include "Primitive.h"
  19.  
  20. class Scene3D
  21. {
  22. protected:
  23.  Camera        *camera;        // a camera
  24.  Light        **lList;        // a list of point lights
  25.  Primitive  **pList;        // a list of primitives
  26.  int        lightN,        // number of light sources in the list
  27.         primitiveN;        // number of primitives in the scene
  28. public:
  29.  Scene3D();
  30.  ~Scene3D();
  31.  char* rayTrace(vec2 res);
  32.  
  33.  // friends
  34.  friend istream& operator >> (istream& s, Scene3D& a);
  35. };