Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Scene Class Reference

Class representing all scene data. More...

#include <scene.h>

List of all members.

Public Member Functions

 Scene ()
 Initializes an empty scene.
 ~Scene ()
 Destroys the scene and all its nodes.
void add (Node *node, Node *parent=0)
 Adds a node to the scene hierarchy.
void prepare ()
 Prepare scene for raytracing.
void setBackground (const Color &c)
 Sets the background color to c.
void setBackground (LightProbe *lp)
 Sets the current light probe to use for the background to lp.
Color getBackground (const Vector &d) const
 Returns the background color in direction d.
bool intersect (const Ray &ray)
 Returns true if the given ray intersects the scene.
bool intersect (const Ray &ray, Intersection &is)
 Returns true if the given ray intersects the scene.
int getNumberOfCameras () const
 Returns the number of cameras in the scene.
CameragetCamera (int i) const
 Returns a pointer to camera number i (starting at 0).
int getNumberOfLights () const
 Returns the number of lights (PointLight) in the scene.
PointLightgetLight (int i) const
 Returns a pointer to light number i (starting at 0).


Detailed Description

Class representing all scene data.

Scene objects (primitives, light sources, cameras) are added to the scene with the add() function, and internally stored in a scene graph. Before any operations can be performed on the scene, the prepare() function should be called. This function prepares the scene hierarchy for rendering by computing all transform matrices, setting up an acceleration data structure, and caching necessary data. A ray can be intersected tested against the scene by calling the intersect() functions.


The documentation for this class was generated from the following files:
Generated on Sun Mar 26 19:14:16 2006 for ASR by  doxygen 1.4.4