Nori  23
Scene Class Reference

Main scene data structure. More...

#include <scene.h>

Inheritance diagram for Scene:
Collaboration diagram for Scene:

Public Member Functions

 Scene (const PropertyList &)
 Construct a new scene object.
 
virtual ~Scene ()
 Release all memory.
 
const BVHgetBVH () const
 Return a pointer to the scene's kd-tree.
 
const IntegratorgetIntegrator () const
 Return a pointer to the scene's integrator.
 
IntegratorgetIntegrator ()
 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< 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 EmittergetRandomEmitter (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 BoundingBox3fgetBoundingBox () 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
 

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 34 of file scene.h.

Member Function Documentation

◆ activate()

void Scene::activate ( )
overridevirtual

Inherited from NoriObject::activate()

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

Reimplemented from NoriObject.

Definition at line 42 of file scene.cpp.

◆ rayIntersect() [1/2]

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 108 of file scene.h.

◆ rayIntersect() [2/2]

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 89 of file scene.h.


The documentation for this class was generated from the following files: