#include <scene.h>
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) const |
Returns true if the given ray intersects the scene. | |
bool | intersect (const Ray &ray, Intersection &isect) const |
Returns true if the given ray intersects the scene. | |
int | getNumberOfCameras () const |
Returns the number of cameras in the scene. | |
Camera * | getCamera (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. | |
PointLight * | getLight (int i) const |
Returns a pointer to light number i (starting at 0). |
This class provides a simple interface for accessing the scene's objects and performing intersection tests.