neuray API Programmer's Manual

irender_target.h File Reference

Description

Abstract interface for render targets.

Code Example

irender_target.h

‎/***************************************************************************************************
 * Copyright 2023 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#ifndef MI_NEURAYLIB_IRENDER_TARGET_H
#define MI_NEURAYLIB_IRENDER_TARGET_H

#include <mi/base/interface_declare.h>
#include <mi/base/handle.h>

#include <mi/neuraylib/idata.h>
#include <mi/neuraylib/icanvas.h>

namespace mi {

namespace neuraylib {








enum Canvas_type
{
    TYPE_RESULT,                    
    TYPE_RESULT_IRRADIANCE,         
    TYPE_RESULT_IRRADIANCE_PROBE,   
    TYPE_ALPHA,                     

    TYPE_SHADOW,                    
    TYPE_AMBIENT_OCCLUSION,         

    TYPE_RAYLENGTH,                 
    TYPE_DEPTH,                     
    TYPE_MATERIAL_TAG,              
    TYPE_MATERIAL_ID,               
    TYPE_OBJECT_ID,                 
    TYPE_NORMAL,                    
    TYPE_TEXTURE_COORDINATE,        
    TYPE_BSDF_WEIGHT,               

    TYPE_CONVERGENCE_HEATMAP,       
    TYPE_POST_TOON,                 

    TYPE_MOTION_VECTOR,             

    TYPE_WORLD_POSITION,            

    TYPE_SELECTION_OUTLINE,         

    TYPE_MULTI_MATTE,               

    TYPE_COUNT,                     
    TYPE_UNDEFINED = 0xffffffffU    
};

enum Canvas_parameter
{
    PARAM_COLOR_LPE,                
    PARAM_ALPHA_LPE,                
    PARAM_INDEX,                    
    PARAM_EDGE_COLOR,               
    PARAM_EDGE_COLOR_2,             
    PARAM_SHADE_COLOR,              
    PARAM_SCALE,                    
    PARAM_PROCESSING_DISABLED,      
    PARAM_MULTI_INDEX,              
    PARAM_SELECTION_SUBSET,         

    PARAM_COUNT,                    
    PARAM_UNDEFINED = 0xffffffffU   
};

class ICanvas_parameters : public
    mi::base::Interface_declare<0x8aafab6f,0x57d0,0x4817,0x87,0xfe,0x9f,0x97,0x9b,0xc9,0xc2,0x11>
{
public:
    virtual Canvas_type 
               get_type() const = 0;

    virtual const IData* get_parameter(Canvas_parameter param) const = 0;

    template <typename T>
    base::Handle< const T> 
               get_parameter(const Canvas_parameter param) const
    {
        return base::make_handle(this->get_parameter(param)).template get_interface<const T>();
    }
};

class IRender_target_base : public
    mi::base::Interface_declare<0x8aafab6e,0x57d9,0x4816,0x87,0xfe,0x9f,0x97,0x9b,0xc9,0xc2,0xbf>
{
public:
    virtual Uint32 
               get_canvas_count() const = 0;

    virtual Canvas_type 
               get_canvas_type( Uint32 index) const = 0;

    virtual const ICanvas_base* get_canvas( Uint32 index) const = 0;

    virtual ICanvas_base* get_canvas( Uint32 index) = 0;

    virtual const ICanvas_parameters* get_canvas_parameters( Uint32 index) const = 0;
};

class IRender_target : public
    mi::base::Interface_declare<0xd4dff23d,0x9b42,0x48d4,0x80,0x01,0x8c,0x9a,0x13,0x51,0x83,0x69,
                                neuraylib::IRender_target_base>
{
public:
    virtual const ICanvas* get_canvas( Uint32 index) const = 0;

    virtual ICanvas* get_canvas( Uint32 index) = 0;
};
 // end group mi_neuray_rendering

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_IRENDER_TARGET_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
Abstract interface for render target canvas parameters. More...
class 
Abstract interface for a render target. More...
class 
Abstract interface for a render target (base class). More...

Enumerations

enum  {PARAM_COLOR_LPE, PARAM_ALPHA_LPE, PARAM_INDEX, PARAM_EDGE_COLOR, PARAM_EDGE_COLOR_2, PARAM_SHADE_COLOR, PARAM_SCALE, PARAM_PROCESSING_DISABLED, PARAM_MULTI_INDEX, PARAM_SELECTION_SUBSET, PARAM_COUNT, PARAM_UNDEFINED = 0xffffffffU }
The type of a render target canvas parameter in mi::neuraylib::ICanvas_parameters. More...
enum  {TYPE_RESULT, TYPE_RESULT_IRRADIANCE, TYPE_RESULT_IRRADIANCE_PROBE, TYPE_ALPHA, TYPE_SHADOW, TYPE_AMBIENT_OCCLUSION, TYPE_RAYLENGTH, TYPE_DEPTH, TYPE_MATERIAL_TAG, TYPE_MATERIAL_ID, TYPE_OBJECT_ID, TYPE_NORMAL, TYPE_TEXTURE_COORDINATE, TYPE_BSDF_WEIGHT, TYPE_CONVERGENCE_HEATMAP, TYPE_POST_TOON, TYPE_MOTION_VECTOR, TYPE_WORLD_POSITION, TYPE_SELECTION_OUTLINE, TYPE_MULTI_MATTE, TYPE_COUNT, TYPE_UNDEFINED = 0xffffffffU }
The type of a canvas in an mi::neuraylib::IRender_target_base. More...