neuray API Programmer's Manual

icanvas.h File Reference

Description

Abstract interface for canvases.

Code Example

icanvas.h

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

#ifndef MI_NEURAYLIB_ICANVAS_H
#define MI_NEURAYLIB_ICANVAS_H

#include <mi/base/interface_declare.h>
#include <mi/neuraylib/vector_typedefs.h>

namespace mi {

namespace neuraylib {

class ITile;







class ICanvas_base : public
    mi::base::Interface_declare<0x649fc7bd,0xc021,0x4aff,0x9e,0xa4,0x5b,0xab,0x18,0xb9,0x25,0x59>
{
public:
    virtual Uint32 
               get_resolution_x() const = 0;

    virtual Uint32 
               get_resolution_y() const = 0;

    virtual const char* get_type() const = 0;

    virtual Uint32 
               get_layers_size() const = 0;

    virtual Float32 
               get_gamma() const = 0;

    virtual void set_gamma( Float32 gamma) = 0;

};

class ICanvas : public
    mi::base::Interface_declare<0x20e5d5de,0x1f61,0x441c,0x88,0x88,0xff,0x85,0x89,0x98,0x7a,0xfa,
                                neuraylib::ICanvas_base>
{
public:

    virtual const ITile* get_tile( Uint32 layer = 0) const = 0;

    virtual ITile* get_tile( Uint32 layer = 0) = 0;
};


inline Uint32_2 
               get_resolution(const ICanvas_base& canvas)
{
    return Uint32_2(canvas.get_resolution_x(),canvas.get_resolution_y());
}

 // end group mi_neuray_rendering

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_ICANVAS_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 a canvas represented by a rectangular array of tiles. More...
class 
Abstract interface for a canvas (base class). More...

Functions

Uint32_2  ( const ICanvas_base& canvas)
Convenience function which returns a canvas' resolution in a struct. More...