Nori

Scene Class Reference

Main scene data structure. More...

#include <scene.h>

Inheritance diagram for Scene:
NoriObject

List of all members.

Public Member Functions

 Scene (const PropertyList &)
 Construct a new scene object.
virtual ~Scene ()
 Release all memory.
const KDTreegetKDTree () const
 Return a pointer to the scene's kd-tree.
const IntegratorgetIntegrator () const
 Return a pointer to the scene's integrator.
const CameragetCamera () const
 Return a pointer to the scene's camera.
const SamplergetSampler () const
 Return a pointer to the scene's sample generator (const version)
SamplergetSampler ()
 Return a pointer to the scene's sample generator.
const std::vector< Mesh * > & getMeshes () const
 Return a reference to an array containing all meshes.
bool rayIntersect (const Ray3f &ray, Intersection &its) const
 Intersect a ray against all triangles stored in the scene and return detailed intersection information.
bool rayIntersect (const Ray3f &ray) const
 Intersect a ray against all triangles stored in the scene and only determine whether or not there is an intersection.
const BoundingBox3fgetBoundingBox () const
 Return an axis-aligned box that bounds the scene.
void activate ()
 Inherited from NoriObject::activate()
void addChild (NoriObject *obj)
 Add a child object to the scene (meshes, integrators etc.)
QString toString () const
 Return a brief string summary of the instance (for debugging purposes)
EClassType getClassType () const
 Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.

Detailed Description

Main scene data structure.

This class holds information on scene objects and is responsible for coordinating rendering jobs. It also provides useful query routines that are mostly used by the Integrator implementations.

Definition at line 33 of file scene.h.


Constructor & Destructor Documentation

Scene::Scene ( const PropertyList )

Construct a new scene object.

virtual Scene::~Scene ( ) [virtual]

Release all memory.


Member Function Documentation

void Scene::activate ( ) [virtual]

Inherited from NoriObject::activate()

Initializes the internal data structures (kd-tree, luminaire sampling data structures, etc.)

Reimplemented from NoriObject.

void Scene::addChild ( NoriObject obj) [virtual]

Add a child object to the scene (meshes, integrators etc.)

Reimplemented from NoriObject.

const BoundingBox3f& Scene::getBoundingBox ( ) const [inline]

Return an axis-aligned box that bounds the scene.

Definition at line 100 of file scene.h.

const Camera* Scene::getCamera ( ) const [inline]

Return a pointer to the scene's camera.

Definition at line 48 of file scene.h.

EClassType Scene::getClassType ( ) const [inline, virtual]

Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.

Implements NoriObject.

Definition at line 118 of file scene.h.

const Integrator* Scene::getIntegrator ( ) const [inline]

Return a pointer to the scene's integrator.

Definition at line 45 of file scene.h.

const KDTree* Scene::getKDTree ( ) const [inline]

Return a pointer to the scene's kd-tree.

Definition at line 42 of file scene.h.

const std::vector<Mesh *>& Scene::getMeshes ( ) const [inline]

Return a reference to an array containing all meshes.

Definition at line 57 of file scene.h.

const Sampler* Scene::getSampler ( ) const [inline]

Return a pointer to the scene's sample generator (const version)

Definition at line 51 of file scene.h.

Sampler* Scene::getSampler ( ) [inline]

Return a pointer to the scene's sample generator.

Definition at line 54 of file scene.h.

bool Scene::rayIntersect ( const Ray3f ray,
Intersection its 
) const [inline]

Intersect a ray against all triangles stored in the scene and return detailed intersection information.

Parameters:
rayA 3-dimensional ray data structure with minimum/maximum extent information
itsA detailed intersection record, which will be filled by the intersection query
Returns:
true if an intersection was found

Definition at line 73 of file scene.h.

bool Scene::rayIntersect ( const Ray3f ray) const [inline]

Intersect a ray against all triangles stored in the scene and only determine whether or not there is an intersection.

This method much faster than the other ray tracing function, but the performance comes at the cost of not providing any additional information about the detected intersection (not even its position).

Parameters:
rayA 3-dimensional ray data structure with minimum/maximum extent information
Returns:
true if an intersection was found

Definition at line 92 of file scene.h.

QString Scene::toString ( ) const [virtual]

Return a brief string summary of the instance (for debugging purposes)

Implements NoriObject.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines