Base class of all objects. More...
#include <object.h>
Public Types | |
enum | EClassType { EScene = 0 , EMesh , ETexture , EBSDF , EPhaseFunction , EEmitter , EMedium , 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. More... | |
virtual void | setParent (NoriObject *parent) |
Set the parent object. More... | |
virtual void | activate () |
Perform some action associated with the object. More... | |
virtual std::string | toString () const =0 |
Return a brief string summary of the instance (for debugging purposes) | |
void | setIdName (const std::string &name) |
Allow to assign a name to the object. | |
const std::string & | getIdName () const |
Static Public Member Functions | |
static std::string | classTypeName (EClassType type) |
Turn a class type into a human-readable string. | |
Protected Attributes | |
std::string | m_idname |
Base class of all objects.
A Nori object represents an instance that is part of a scene description, e.g. a scattering model or emitter.
|
inlinevirtual |
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().
Reimplemented in StudentsTTest, PerspectiveCamera, Diffuse, ChiSquareTest, Shape, Scene, and Mesh.
|
inlinevirtual |
Add a child object to the current instance.
The default implementation does not support children and simply throws an exception
Reimplemented in StudentsTTest, PerspectiveCamera, Diffuse, ChiSquareTest, Scene, and Shape.
|
inlinevirtual |