Main scene data structure. More...
#include <scene.h>
Public Member Functions | |
Scene (const PropertyList &) | |
Construct a new scene object. | |
virtual | ~Scene () |
Release all memory. | |
const BVH * | getBVH () const |
Return a pointer to the scene's kd-tree. | |
const Integrator * | getIntegrator () const |
Return a pointer to the scene's integrator. | |
Integrator * | getIntegrator () |
Return a pointer to the scene's integrator. | |
const Camera * | getCamera () const |
Return a pointer to the scene's camera. | |
const Sampler * | getSampler () const |
Return a pointer to the scene's sample generator (const version) | |
Sampler * | getSampler () |
Return a pointer to the scene's sample generator. | |
const std::vector< Shape * > & | getShapes () const |
Return a reference to an array containing all shapes. | |
const std::vector< Emitter * > & | getLights () const |
Return a reference to an array containing all lights. | |
const Emitter * | getRandomEmitter (float rnd) const |
Return a random emitter. | |
bool | rayIntersect (const Ray3f &ray, Intersection &its) const |
Intersect a ray against all triangles stored in the scene and return detailed intersection information. More... | |
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. More... | |
const BoundingBox3f & | getBoundingBox () const |
Return an axis-aligned box that bounds the scene. | |
virtual void | activate () override |
Inherited from NoriObject::activate() More... | |
virtual void | addChild (NoriObject *obj) override |
Add a child object to the scene (meshes, integrators etc.) | |
virtual std::string | toString () const override |
Return a string summary of the scene (for debugging purposes) | |
virtual EClassType | getClassType () const override |
Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance. | |
Public Member Functions inherited from NoriObject | |
virtual | ~NoriObject () |
Virtual destructor. | |
virtual void | setParent (NoriObject *parent) |
Set the parent object. More... | |
void | setIdName (const std::string &name) |
Allow to assign a name to the object. | |
const std::string & | getIdName () const |
Additional Inherited Members | |
Public Types inherited from NoriObject | |
enum | EClassType { EScene = 0 , EMesh , ETexture , EBSDF , EPhaseFunction , EEmitter , EMedium , ECamera , EIntegrator , ESampler , ETest , EReconstructionFilter , EClassTypeCount } |
Static Public Member Functions inherited from NoriObject | |
static std::string | classTypeName (EClassType type) |
Turn a class type into a human-readable string. | |
Protected Attributes inherited from NoriObject | |
std::string | m_idname |
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.
|
overridevirtual |
Inherited from NoriObject::activate()
Initializes the internal data structures (kd-tree, emitter sampling data structures, etc.)
Reimplemented from NoriObject.
|
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).
ray | A 3-dimensional ray data structure with minimum/maximum extent information |
true
if an intersection was found
|
inline |
Intersect a ray against all triangles stored in the scene and return detailed intersection information.
ray | A 3-dimensional ray data structure with minimum/maximum extent information |
its | A detailed intersection record, which will be filled by the intersection query |
true
if an intersection was found