LuxCore  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
luxcore::RenderSession Class Referenceabstract

RenderSession executes a rendering based on the RenderConfig provided. More...

#include <luxcore.h>

Public Member Functions

virtual ~RenderSession ()
 
virtual const RenderConfigGetRenderConfig () const =0
 Returns a reference to the RenderingConfig used to create this RenderSession. More...
 
virtual RenderStateGetRenderState ()=0
 Returns a pointer to the current RenderState. The session must be paused. More...
 
virtual void Start ()=0
 Starts the rendering. More...
 
virtual void Stop ()=0
 Stops the rendering. More...
 
virtual bool IsStarted () const =0
 It can be used to check if the session has been started. More...
 
virtual void BeginSceneEdit ()=0
 Stops the rendering and allows to edit the Scene. More...
 
virtual void EndSceneEdit ()=0
 Ends the Scene editing and start the rendering again. More...
 
virtual bool IsInSceneEdit () const =0
 It can be used to check if the session is in scene editing mode. More...
 
virtual void Pause ()=0
 Pause the rendering. More...
 
virtual void Resume ()=0
 Resume the rendering. More...
 
virtual bool IsInPause () const =0
 It can be used to check if the session is in scene editing mode. More...
 
virtual bool HasDone () const =0
 It can be used to check if the rendering is over. More...
 
virtual void WaitForDone () const =0
 Used to wait for the end of the rendering. More...
 
virtual void WaitNewFrame ()=0
 Used to wait for the next frame with real-time render engines like RTPATHOCL. It does nothing with other render engines. More...
 
virtual FilmGetFilm ()=0
 Returns a reference to a Film with the output of the rendering. More...
 
virtual void UpdateStats ()=0
 Updates the statistics. This function perform also all periodic checks and tasks (like saving the film outputs, etc.). More...
 
virtual const luxrays::PropertiesGetStats () const =0
 Returns a list of statistics related to the ongoing rendering. The returned Properties is granted to have content only after the first call to the UpdateStats method. More...
 
virtual void Parse (const luxrays::Properties &props)=0
 Dynamic edit the definition of RenderConfig properties. More...
 
virtual void SaveResumeFile (const std::string &fileName)=0
 Save all the rendering related information (the LuxCore RenderConfig, Scene, RenderState and Film) in a file for a later restart. The resume file extension must be ".rsm". More...
 

Static Public Member Functions

static RenderSessionCreate (const RenderConfig *config, RenderState *startState=NULL, Film *startFilm=NULL)
 Creates a new RenderSession using the provided RenderConfig. More...
 
static RenderSessionCreate (const RenderConfig *config, const std::string &startStateFileName, const std::string &startFilmFileName)
 Creates a new RenderSession using the provided RenderConfig. More...
 

Detailed Description

RenderSession executes a rendering based on the RenderConfig provided.

Definition at line 1051 of file luxcore.h.

Constructor & Destructor Documentation

virtual luxcore::RenderSession::~RenderSession ( )
virtual

Member Function Documentation

virtual void luxcore::RenderSession::BeginSceneEdit ( )
pure virtual

Stops the rendering and allows to edit the Scene.

static RenderSession* luxcore::RenderSession::Create ( const RenderConfig config,
RenderState startState = NULL,
Film startFilm = NULL 
)
static

Creates a new RenderSession using the provided RenderConfig.

Parameters
configis the RenderConfig used to create the rendering session. The RenderConfig is not deleted by the destructor.
startStateis the optional RenderState to use to resume rendering. The memory for RenderState is freed by RenderSession.
startFilmis the optional Film to use to resume rendering. The memory for Film is freed by RenderSession.
static RenderSession* luxcore::RenderSession::Create ( const RenderConfig config,
const std::string &  startStateFileName,
const std::string &  startFilmFileName 
)
static

Creates a new RenderSession using the provided RenderConfig.

Parameters
configis the RenderConfig used to create the rendering session. The RenderConfig is not deleted by the destructor.
startStateFileNameis the file name of a RenderState to use to resume rendering.
startFilmFileNameis the file name of a Film to use to resume rendering.
virtual void luxcore::RenderSession::EndSceneEdit ( )
pure virtual

Ends the Scene editing and start the rendering again.

virtual Film& luxcore::RenderSession::GetFilm ( )
pure virtual

Returns a reference to a Film with the output of the rendering.

Returns
the reference to the Film.
virtual const RenderConfig& luxcore::RenderSession::GetRenderConfig ( ) const
pure virtual

Returns a reference to the RenderingConfig used to create this RenderSession.

Returns
a reference to the RenderingConfig.
virtual RenderState* luxcore::RenderSession::GetRenderState ( )
pure virtual

Returns a pointer to the current RenderState. The session must be paused.

Returns
a pointer to the RenderState.
virtual const luxrays::Properties& luxcore::RenderSession::GetStats ( ) const
pure virtual

Returns a list of statistics related to the ongoing rendering. The returned Properties is granted to have content only after the first call to the UpdateStats method.

Returns
a Properties container with the statistics.
virtual bool luxcore::RenderSession::HasDone ( ) const
pure virtual

It can be used to check if the rendering is over.

virtual bool luxcore::RenderSession::IsInPause ( ) const
pure virtual

It can be used to check if the session is in scene editing mode.

virtual bool luxcore::RenderSession::IsInSceneEdit ( ) const
pure virtual

It can be used to check if the session is in scene editing mode.

virtual bool luxcore::RenderSession::IsStarted ( ) const
pure virtual

It can be used to check if the session has been started.

virtual void luxcore::RenderSession::Parse ( const luxrays::Properties props)
pure virtual

Dynamic edit the definition of RenderConfig properties.

Parameters
propsare the Properties with the definition of: film.imagepipeline(s).* (including radiance channel scales), film.outputs.*, film.width or film.height.
virtual void luxcore::RenderSession::Pause ( )
pure virtual

Pause the rendering.

virtual void luxcore::RenderSession::Resume ( )
pure virtual

Resume the rendering.

virtual void luxcore::RenderSession::SaveResumeFile ( const std::string &  fileName)
pure virtual

Save all the rendering related information (the LuxCore RenderConfig, Scene, RenderState and Film) in a file for a later restart. The resume file extension must be ".rsm".

Parameters
fileNameis the binary file used to save.
virtual void luxcore::RenderSession::Start ( )
pure virtual

Starts the rendering.

virtual void luxcore::RenderSession::Stop ( )
pure virtual

Stops the rendering.

virtual void luxcore::RenderSession::UpdateStats ( )
pure virtual

Updates the statistics. This function perform also all periodic checks and tasks (like saving the film outputs, etc.).

virtual void luxcore::RenderSession::WaitForDone ( ) const
pure virtual

Used to wait for the end of the rendering.

virtual void luxcore::RenderSession::WaitNewFrame ( )
pure virtual

Used to wait for the next frame with real-time render engines like RTPATHOCL. It does nothing with other render engines.


The documentation for this class was generated from the following file: