neuray Services API Programmer's Manual

mi::nservices::IRender_loop_handler_render_result Class Reference

[Render Loops]

Description

A user implemented interface that returns the result of an individual render call in a render loop handler.

Public Member Functions

virtual mi::base::IInterfaceget_render( mi::Uint32 index) const =0
Returns a render by index. More...
template< typename Render_type>Render_type* get_render( mi::Uint32 index) const
Typed convenience function for getting a render result. More...
virtual mi::Uint32 get_render_count() const =0
Returns how many rendered images have been produced by the call.
virtual mi::Sint32 get_render_result() const =0
Returns the render result as described in mi::neuraylib::IRender_context::render(). More...
virtual const char* get_render_type( mi::Uint32 index) const =0
Returns the type of render. More...
virtual mi::Uint32 get_resolution_x( mi::Uint32 index) const =0
Returns the resolution in the x direction of the canvas or binary image at index. More...
virtual mi::Uint32 get_resolution_y( mi::Uint32 index) const =0
Returns the resolution in the y direction of the canvas or binary image at index. More...
virtual bool  is_iray_rendering() const =0
Returns whether Iray is currently rendering in the background or not. More...

Member Functions

virtual mi::base::IInterface* mi::​nservices::​IRender_loop_handler_render_result::get_render( mi::Uint32 index) const [pure virtual]

Returns a render by index. The returned interface will either be an mi::neuraylib::ICanvas or an mi::nservices::IBinary if the canvas as already been encoded to an image.

Parameters

index
The index of the requested render. Use mi::nservices::IRender_loop_handler_render_result::get_render_count() to inquire the number of renders.

Returns

Interface to the render result or NULL if index is out of range.

template< typename Render_type>

Render_type* mi::​nservices::​IRender_loop_handler_render_result::get_render( mi::Uint32 index) const [inline]

Typed convenience function for getting a render result. Returns a render by index. The returned interface will either be an mi::neuraylib::ICanvas or an mi::nservices::IBinary if the canvas as already been encoded to an image.

Parameters

index
The index of the requested render. Use mi::nservices::IRender_loop_handler_render_result::get_render_count() to inquire the number of renders.

Returns

Interface to the render result or NULL if index is out of range.

virtual mi::Uint32 mi::​nservices::​IRender_loop_handler_render_result::get_render_count() const [pure virtual]

Returns how many rendered images have been produced by the call.

virtual mi::Sint32 mi::​nservices::​IRender_loop_handler_render_result::get_render_result() const [pure virtual]

Returns the render result as described in mi::neuraylib::IRender_context::render(). Note that for non-progressive renders this should always return 1 on a successful render. Otherwise the loop controlling the handler will think the image is not converged and will continuously re-render even though the same image will be produced. Non-progressive renders should always be considered to be converged. Also note that a special render result of -101 may be returned indicating that initialization failed before rendering could be attempted.

virtual const char* mi::​nservices::​IRender_loop_handler_render_result::get_render_type( mi::Uint32 index) const [pure virtual]

Returns the type of render. This will be result for normal renders or a handler defined string for other types of renders

Parameters

index
The index of the requested render. Use mi::nservices::IRender_loop_handler_render_result::get_render_count() to inquire the number of renders.

Returns

the render type.

virtual mi::Uint32 mi::​nservices::​IRender_loop_handler_render_result::get_resolution_x( mi::Uint32 index) const [pure virtual]

Returns the resolution in the x direction of the canvas or binary image at index.

Parameters

index
The index of the image to query.

Returns

The resolution of the image in the x direction.

virtual mi::Uint32 mi::​nservices::​IRender_loop_handler_render_result::get_resolution_y( mi::Uint32 index) const [pure virtual]

Returns the resolution in the y direction of the canvas or binary image at index.

Parameters

index
The index of the image to query.

Returns

The resolution of the image in the y direction.

virtual bool mi::​nservices::​IRender_loop_handler_render_result::is_iray_rendering() const [pure virtual]

Returns whether Iray is currently rendering in the background or not. If not rendering (false) then the render loop will commit the rendering transaction and potentially execute any queued commands. If still rendering (true) then the transaction will not be committed and reused in the next render call.