neuray API Programmer's Manual

icompound.h File Reference

Description

Compounds type, i.e., vectors, matrices, colors, spectrums, and bounding boxes.

Code Example

icompound.h

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

#ifndef MI_NEURAYLIB_ICOMPOUND_H
#define MI_NEURAYLIB_ICOMPOUND_H

#include <mi/neuraylib/idata.h>

namespace mi {


































class ICompound : public
    base::Interface_declare<0x65437cd6,0x9727,0x488c,0xa9,0xc5,0x92,0x42,0x43,0xf5,0x5b,0xa0,
                            IData_collection>
{
public:
    virtual Size 
               get_number_of_rows() const = 0;

    virtual Size 
               get_number_of_columns() const = 0;

    virtual Size 
               get_length() const = 0;

    virtual const char* get_element_type_name() const = 0;

    virtual bool get_value( Size row, Size column, bool& value) const = 0;

    virtual bool get_value( Size row, Size column, Sint32& value) const = 0;

    virtual bool get_value( Size row, Size column, Uint32& value) const = 0;

    virtual bool get_value( Size row, Size column, Float32& value) const = 0;

    virtual bool get_value( Size row, Size column, Float64& value) const = 0;

    template<class T>
    T get_value( Size row, Size column) const
    {
        T value;
        bool result = get_value( row, column, value);
        return result ? value : static_cast<T>( 0);
    }

    virtual bool set_value( Size row, Size column, bool value) = 0;

    virtual bool set_value( Size row, Size column, Sint32 value) = 0;

    virtual bool set_value( Size row, Size column, Uint32 value) = 0;

    virtual bool set_value( Size row, Size column, Float32 value) = 0;

    virtual bool set_value( Size row, Size column, Float64 value) = 0;

    virtual void get_values( bool* values) const = 0;

    virtual void get_values( Sint32* values) const = 0;

    virtual void get_values( Uint32* values) const = 0;

    virtual void get_values( Float32* values) const = 0;

    virtual void get_values( Float64* values) const = 0;

    virtual void set_values( const bool* values) = 0;

    virtual void set_values( const Sint32* values) = 0;

    virtual void set_values( const Uint32* values) = 0;

    virtual void set_values( const Float32* values) = 0;

    virtual void set_values( const Float64* values) = 0;

    using IData_collection::get_value;

    using IData_collection::set_value;
};
 // end group mi_neuray_compounds

} // namespace mi

#endif // MI_NEURAYLIB_ICOMPOUND_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...

Classes

class 
This interface represents compounds, i.e., vectors, matrices, colors, spectrums, and bounding boxes. More...