Nori
|
Base class of all objects. More...
#include <object.h>
Public Types | |
enum | EClassType { EScene = 0, EMesh, EBSDF, ELuminaire, ECamera, EIntegrator, ESampler, ETest, EReconstructionFilter, EClassTypeCount } |
Public Member Functions | |
virtual | ~NoriObject () |
Virtual destructor. | |
virtual EClassType | getClassType () const =0 |
Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance. | |
virtual void | addChild (NoriObject *child) |
Add a child object to the current instance. | |
virtual void | setParent (NoriObject *parent) |
Set the parent object. | |
virtual void | activate () |
Perform some action associated with the object. | |
virtual QString | toString () const =0 |
Return a brief string summary of the instance (for debugging purposes) | |
Static Public Member Functions | |
static QString | classTypeName (EClassType type) |
Turn a class type into a human-readable string. |
Base class of all objects.
A Nori object represents an instance that is part of a scene description, e.g. a scattering model or luminaire.
virtual NoriObject::~NoriObject | ( | ) | [inline, virtual] |
virtual void NoriObject::activate | ( | ) | [virtual] |
Perform some action associated with the object.
The default implementation throws an exception. Certain objects may choose to override it, e.g. to implement initialization, testing, or rendering functionality.
This function is called by the XML parser once it has constructed an object and added all of its children using addChild().
virtual void NoriObject::addChild | ( | NoriObject * | child | ) | [virtual] |
static QString NoriObject::classTypeName | ( | EClassType | type | ) | [inline, static] |
virtual EClassType NoriObject::getClassType | ( | ) | const [pure virtual] |
Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.
Implemented in Camera, Integrator, Mesh, ReconstructionFilter, Sampler, and Scene.
virtual void NoriObject::setParent | ( | NoriObject * | parent | ) | [virtual] |
Set the parent object.
Subclasses may choose to override this method to be notified when they are added to a parent object. The default implementation does nothing.
virtual QString NoriObject::toString | ( | ) | const [pure virtual] |