MDL SDK API nvidia_logo_transpbg.gif Up
icompound.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_ICOMPOUND_H
8#define MI_NEURAYLIB_ICOMPOUND_H
9
10#include <mi/neuraylib/idata.h>
11
12namespace mi {
13
60class ICompound : public
61 base::Interface_declare<0x65437cd6,0x9727,0x488c,0xa9,0xc5,0x92,0x42,0x43,0xf5,0x5b,0xa0,
62 IData_collection>
63{
64public:
66 virtual Size get_number_of_rows() const = 0;
67
71 virtual Size get_number_of_columns() const = 0;
72
76 virtual Size get_length() const = 0;
77
79 virtual const char* get_element_type_name() const = 0;
80
84 virtual bool get_value( Size row, Size column, bool& value) const = 0;
85
89 virtual bool get_value( Size row, Size column, Sint32& value) const = 0;
90
94 virtual bool get_value( Size row, Size column, Uint32& value) const = 0;
95
99 virtual bool get_value( Size row, Size column, Float32& value) const = 0;
100
104 virtual bool get_value( Size row, Size column, Float64& value) const = 0;
105
109 template<class T>
110 T get_value( Size row, Size column) const
111 {
112 T value;
113 bool result = get_value( row, column, value);
114 return result ? value : static_cast<T>( 0);
115 }
116
120 virtual bool set_value( Size row, Size column, bool value) = 0;
121
125 virtual bool set_value( Size row, Size column, Sint32 value) = 0;
126
130 virtual bool set_value( Size row, Size column, Uint32 value) = 0;
131
135 virtual bool set_value( Size row, Size column, Float32 value) = 0;
136
140 virtual bool set_value( Size row, Size column, Float64 value) = 0;
141
146 virtual void get_values( bool* values) const = 0;
147
152 virtual void get_values( Sint32* values) const = 0;
153
158 virtual void get_values( Uint32* values) const = 0;
159
164 virtual void get_values( Float32* values) const = 0;
165
170 virtual void get_values( Float64* values) const = 0;
171
176 virtual void set_values( const bool* values) = 0;
177
182 virtual void set_values( const Sint32* values) = 0;
183
188 virtual void set_values( const Uint32* values) = 0;
189
194 virtual void set_values( const Float32* values) = 0;
195
200 virtual void set_values( const Float64* values) = 0;
201
203
205};
206 // end group mi_neuray_compounds
208
209} // namespace mi
210
211#endif // MI_NEURAYLIB_ICOMPOUND_H
This interface represents compounds, i.e., vectors, matrices, colors, spectrums, and bounding boxes.
Definition: icompound.h:63
virtual void get_values(Sint32 *values) const =0
Accesses the elements of the compound.
virtual void get_values(bool *values) const =0
Accesses the elements of the compound.
T get_value(Size row, Size column) const
Accesses the (row, column)-th element.
Definition: icompound.h:110
virtual void get_values(Float64 *values) const =0
Accesses the elements of the compound.
virtual void get_values(Float32 *values) const =0
Accesses the elements of the compound.
virtual bool get_value(Size row, Size column, Sint32 &value) const =0
Accesses the (row, column)-th element.
virtual bool set_value(Size row, Size column, Float64 value)=0
Sets the (row, column)-th element to value.
virtual bool get_value(Size row, Size column, Float64 &value) const =0
Accesses the (row, column)-th element.
virtual void set_values(const Sint32 *values)=0
Sets the elements of the compound.
virtual bool get_value(Size row, Size column, Float32 &value) const =0
Accesses the (row, column)-th element.
virtual void set_values(const Float32 *values)=0
Sets the elements of the compound.
virtual bool get_value(Size row, Size column, bool &value) const =0
Accesses the (row, column)-th element.
virtual bool set_value(Size row, Size column, bool value)=0
Sets the (row, column)-th element to value.
virtual bool set_value(Size row, Size column, Sint32 value)=0
Sets the (row, column)-th element to value.
virtual void set_values(const Float64 *values)=0
Sets the elements of the compound.
virtual bool get_value(Size row, Size column, Uint32 &value) const =0
Accesses the (row, column)-th element.
virtual bool set_value(Size row, Size column, Float32 value)=0
Sets the (row, column)-th element to value.
virtual void get_values(Uint32 *values) const =0
Accesses the elements of the compound.
virtual void set_values(const Uint32 *values)=0
Sets the elements of the compound.
virtual Size get_number_of_rows() const =0
Returns the number of rows of the represented matrix or vector.
virtual const char * get_element_type_name() const =0
Returns the type name of elements of the compound.
virtual void set_values(const bool *values)=0
Sets the elements of the compound.
virtual Size get_number_of_columns() const =0
Returns the number of columns of the represented matrix.
virtual bool set_value(Size row, Size column, Uint32 value)=0
Sets the (row, column)-th element to value.
virtual Size get_length() const =0
Returns the total number of elements.
virtual const base::IInterface * get_value(const char *key) const =0
Returns the value for key key.
virtual Sint32 set_value(const char *key, base::IInterface *value)=0
Stores the value for key key.
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
double Float64
64-bit float.
Definition: types.h:52
float Float32
32-bit float.
Definition: types.h:51
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Types.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5