20 #if !defined(__MITSUBA_RENDER_RENDERJOB_H_)
21 #define __MITSUBA_RENDER_RENDERJOB_H_
73 int samplerResID = -1,
74 bool threadIsCritical =
true,
75 bool interactive =
false);
78 inline void flush() { m_scene->flush(m_queue,
this); }
81 inline void cancel() { m_scene->cancel(); }
84 inline bool wait() {
join();
return !m_cancelled; }
96 inline void setInteractive(
bool interactive) { m_interactive = interactive; }
122 int m_sceneResID, m_samplerResID, m_sensorResID;
123 bool m_ownsSceneResource;
124 bool m_ownsSensorResource;
125 bool m_ownsSamplerResource;
bool isInteractive() const
Are partial results of the rendering process visible, e.g. in a graphical user interface?
Definition: renderjob.h:93
void setInteractive(bool interactive)
Define whether or not this is an interactive job.
Definition: renderjob.h:96
const RenderQueue * getRenderQueue() const
Get a pointer to the underlying render queue (const version)
Definition: renderjob.h:108
Principal scene data structure.
Definition: scene.h:49
Render queue - used to keep track of a number of scenes that are simultaneously being rendered...
Definition: renderqueue.h:65
Scene * getScene()
Get a pointer to the underlying scene.
Definition: renderjob.h:99
void cancel()
Cancel a running render job.
Definition: renderjob.h:81
void join()
Wait until the thread finishes.
void flush()
Write out the current (partially rendered) image.
Definition: renderjob.h:78
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
Reference counting helper.
Definition: ref.h:40
Float getRenderTime() const
Return the amount of time spent rendering the given job (in seconds)
Definition: renderjob.h:111
Cross-platform thread implementation.
Definition: thread.h:34
RenderQueue * getRenderQueue()
Get a pointer to the underlying render queue.
Definition: renderjob.h:105
bool wait()
Wait for the job to finish and return whether it was successful.
Definition: renderjob.h:84
Coordinates the process of rendering a single image.
Definition: renderjob.h:37
const Scene * getScene() const
Get a pointer to the underlying scene (const version)
Definition: renderjob.h:102