irender_context.h File Reference
Description
neuray render context abstraction
Code Example
irender_context.h
/******************************************************************************
* Copyright 2010-2020 MIGENIUS PTY LTD, Australia. All rights reserved.
*
* Portions Copyright 1986, 2011 NVIDIA Corporation. All rights reserved.
*****************************************************************************/
//*****************************************************************************
#ifndef MI_NSERVICES_IRENDER_CONTEXT_H
#define MI_NSERVICES_IRENDER_CONTEXT_H
#include <mi/neuraylib/irender_context.h>
#include <mi/neuraylib/irender_counters.h>
namespace mi {
class IMap;
namespace neuraylib {
class ICanvas;
class IRender_target;
class IRender_target_base;
}
namespace nservices {
class IRender_context : public
mi::base::Interface_declare<0x8A22E985,0x2A9D,0x44F4,0xAD,0xFA,0x30,0xFF,0xE3,0xF6,0x3B,0x96>
{
public:
virtual Sint32
render(
mi::neuraylib::ITransaction* transaction,
mi::neuraylib::IRender_target_base* render_target,
mi::neuraylib::IProgress_callback* progress_callback) = 0;
virtual mi::neuraylib::IPick_array *pick(
mi::neuraylib::ITransaction* transaction,
const Float32_2_struct& point,
const Uint32 max_levels = 1) = 0;
virtual mi::neuraylib::IPick_array *pick(
mi::neuraylib::ITransaction* transaction,
const Float32_2_struct& center,
const Float32_2_struct& size,
const Uint32 max_levels = 1) = 0;
virtual void cancel_render(
Sint32 cancel_level=0) = 0;
virtual Sint32
render_async(
mi::neuraylib::ITransaction* transaction,
mi::neuraylib::IRender_target_base* render_target,
mi::neuraylib::IReady_callback* ready_callback,
mi::neuraylib::IProgress_callback* progress_callback) = 0;
virtual const char * get_name() const = 0;
virtual Uint32
get_timeout() const = 0;
virtual const char *get_renderer() const = 0;
virtual const char *get_scene_name() const = 0;
virtual const char *get_scope_name() const = 0;
virtual mi::neuraylib::IRender_target* get_last_render() const = 0;
virtual Sint32
get_last_render_result() const = 0;
virtual Sint32
store_canvas(const char *name,
neuraylib::ICanvas *canvas) = 0;
virtual neuraylib::ICanvas *retrieve_canvas(const char *name) const = 0;
virtual Sint32
delete_canvas(const char *name) = 0;
virtual mi::neuraylib::IRender_counters* get_render_counters() = 0;
virtual mi::Float64
get_progress(const char *area) const = 0;
virtual Sint32
set_option( const char* name, const IData* value) = 0;
virtual const IData* get_option( const char* name) const = 0;
template<class T>
const T* get_option( const char* name) const
{
const IData* ptr_idata = get_option( name);
if ( !ptr_idata)
return 0;
const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
ptr_idata->release();
return ptr_T;
}
virtual Size
get_options_length() const = 0;
virtual const char* get_option_name( Size index) const = 0;
virtual const char* get_option_type( Size index) const = 0;
virtual mi::neuraylib::IRender_target_base* get_last_render_base() const = 0;
virtual mi::IMap *get_progress() const = 0;
}; // end group mi_nservices_abstractions
} // namespace nservices
} // namespace mi
#endif // MI_NSERVICES_IRENDER_CONTEXT_H
Namespaces
- namespace mi
- namespace mi::neuraylib
- namespace
- Namespace for the neuray Services API. More...
Classes
- class
- The neuray services render context abstraction. More...