Scene Class Reference
Contains all primitive and material data representing a given 3D scene. More...
#include <Scene.h>
Public Member Functions | |
Constructors | |
| Scene (ShapeSet *shapeSet=NULL) | |
| Scene (const MaterialList &materials, ShapeSet *shapeSet=NULL) | |
| virtual | ~Scene () |
Initialization routines | |
| virtual void | init () |
Main usage interface | |
| virtual real_t | getIntersection (const Ray &ray, SurfacePoint &pt) |
| Tests the given ray with this Shape for intersection. If a valid intersection exists, its "t" value will be returned and the given SurfacePoint will be initialized with enough data for this Shape to later fill in all relevant information lazily (world space normal at intersection point, uv coordinates, etc.). | |
| virtual bool | intersects (const Ray &ray, real_t tMax=INFINITY) |
| Used for occlusion/visibility testing where you don't necessarily care about anything other than whether or not an intersection exists. (generally faster than getIntersection). | |
| virtual void | preview () |
| virtual SpectralSampleSet | getBackgroundRadiance (const Vector3 &w) |
Accessors / Mutators | |
| ShapeSet * | getShapes () |
| ShapeSet * | getLights () |
| EmitterSampler | getEmitterSampler () const |
| Material * | getDefaultMaterial () |
| MaterialList & | getMaterials () |
| Emitter * | getBackground () |
| void | setBackground (Emitter *emitter) |
| bool | isInitialized () const |
Protected Attributes | |
| ShapeSet * | m_shapes |
| ShapeSet * | m_lights |
| Emitter * | m_background |
| MaterialList | m_materials |
| EmitterSampler | m_emitterSampler |
| bool | m_initted |
Detailed Description
Contains all primitive and material data representing a given 3D scene.
- Date:
- Fall 2008
Definition at line 22 of file Scene.h.
Constructor & Destructor Documentation
| Scene::Scene | ( | ShapeSet * | shapeSet = NULL |
) | [inline, explicit] |
| Scene::Scene | ( | const MaterialList & | materials, | |
| ShapeSet * | shapeSet = NULL | |||
| ) | [inline, explicit] |
Member Function Documentation
| real_t Scene::getIntersection | ( | const Ray & | ray, | |
| SurfacePoint & | pt | |||
| ) | [virtual] |
Tests the given ray with this Shape for intersection. If a valid intersection exists, its "t" value will be returned and the given SurfacePoint will be initialized with enough data for this Shape to later fill in all relevant information lazily (world space normal at intersection point, uv coordinates, etc.).
- Note:
- if you only care about whether or not an intersection exists and don't actually need to know the exact intersection point, see the intersects method instead.
- Returns:
- the smallest positive "t" value of any intersections found, or INFINITY if no valid intersection exists
Used for occlusion/visibility testing where you don't necessarily care about anything other than whether or not an intersection exists. (generally faster than getIntersection).
- Note:
- default implementation defers to getIntersection
- Returns:
- whether or not the given ray intersects this Shape with a positive "t" value greater than EPSILON and less than the given
tMax
| void Scene::preview | ( | ) | [virtual] |
| SpectralSampleSet Scene::getBackgroundRadiance | ( | const Vector3 & | w | ) | [virtual] |
| EmitterSampler Scene::getEmitterSampler | ( | ) | const [inline] |
Member Data Documentation
ShapeSet* Scene::m_shapes [protected] |
ShapeSet* Scene::m_lights [protected] |
Emitter* Scene::m_background [protected] |
MaterialList Scene::m_materials [protected] |
EmitterSampler Scene::m_emitterSampler [protected] |
bool Scene::m_initted [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6