Generates a spiral of blocks to be rendered. More...
#include <mitsuba/render/spiral.h>
Public Member Functions | |
Spiral (const Film *film) | |
void | reset () |
void | addBlockListener (BlockListener *listener) |
void | removeBlockListener (BlockListener *listener) |
Remove a block listener. More... | |
bool | acquireBlock (ImageBlock *block) |
Acquire an image block from the spiral (thread-safe) More... | |
void | releaseBlock (ImageBlock *block) |
Release a finished image block (thread-safe) More... | |
void | finish () |
Send the finished event even if not all blocks have been processed yet. More... | |
void | notifyFilmChanged () |
Send events notifying all listeners that the film has changed. More... | |
std::vector< ImageBlock * > | getActiveBlocks () const |
Return the list blocks, which are currently being worked on. More... | |
int | getMaxBlockSize () const |
Return the maximum block size. More... | |
virtual const Class * | getClass () const |
Retrieve this object's class. More... | |
Public Member Functions inherited from Object | |
Object () | |
Construct a new object. More... | |
int | getRefCount () const |
Return the current reference count. More... | |
void | incRef () const |
Increase the reference count of the object by one. More... | |
void | decRef (bool autoDeallocate=true) const |
Decrease the reference count of the object and possibly deallocate it. More... | |
virtual std::string | toString () const |
Return a human-readable string representation of the object's contents. More... | |
Static Public Attributes | |
static Class * | m_theClass |
Static Public Attributes inherited from Object | |
static Class * | m_theClass |
Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
virtual | ~Spiral () |
Virtual destructor. More... | |
Protected Member Functions inherited from Object | |
virtual | ~Object () |
Virtual private deconstructor. (Will only be called by ref) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
static void | staticInitialization () |
Initializes the built-in reference count debugger (if enabled) More... | |
static void | staticShutdown () |
Free the memory taken by staticInitialization() More... | |
Generates a spiral of blocks to be rendered.
mitsuba::Spiral::Spiral | ( | const Film * | film | ) |
Create a new spiral generator for an image of the given width and height.
|
protectedvirtual |
Virtual destructor.
bool mitsuba::Spiral::acquireBlock | ( | ImageBlock * | block | ) |
Acquire an image block from the spiral (thread-safe)
void mitsuba::Spiral::addBlockListener | ( | BlockListener * | listener | ) |
Add a block listener, which will be notified whenever a block has been acquired or released.
void mitsuba::Spiral::finish | ( | ) |
Send the finished event even if not all blocks have been processed yet.
std::vector<ImageBlock *> mitsuba::Spiral::getActiveBlocks | ( | ) | const |
Return the list blocks, which are currently being worked on.
|
virtual |
Retrieve this object's class.
Reimplemented from Object.
int mitsuba::Spiral::getMaxBlockSize | ( | ) | const |
Return the maximum block size.
void mitsuba::Spiral::notifyFilmChanged | ( | ) |
Send events notifying all listeners that the film has changed.
void mitsuba::Spiral::releaseBlock | ( | ImageBlock * | block | ) |
Release a finished image block (thread-safe)
void mitsuba::Spiral::removeBlockListener | ( | BlockListener * | listener | ) |
Remove a block listener.
void mitsuba::Spiral::reset | ( | ) |
Reset the spiral to its initial state
|
static |