Nori

NoriObject Class Reference

Base class of all objects. More...

#include <object.h>

Inheritance diagram for NoriObject:
Camera Integrator Mesh ReconstructionFilter Sampler Scene

List of all members.

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.

Detailed Description

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.

Definition at line 33 of file object.h.


Member Enumeration Documentation

Enumerator:
EScene 
EMesh 
EBSDF 
ELuminaire 
ECamera 
EIntegrator 
ESampler 
ETest 
EReconstructionFilter 
EClassTypeCount 

Definition at line 35 of file object.h.


Constructor & Destructor Documentation

virtual NoriObject::~NoriObject ( ) [inline, virtual]

Virtual destructor.

Definition at line 49 of file object.h.


Member Function Documentation

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().

Reimplemented in Mesh, and Scene.

virtual void NoriObject::addChild ( NoriObject child) [virtual]

Add a child object to the current instance.

The default implementation does not support children and simply throws an exception

Reimplemented in Mesh, and Scene.

static QString NoriObject::classTypeName ( EClassType  type) [inline, static]

Turn a class type into a human-readable string.

Definition at line 91 of file object.h.

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]

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

Implemented in Mesh, and Scene.


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