Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::ICompound Class Referenceabstract

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

Inheritance diagram for mi::ICompound:
mi::base::Interface_declare< 0x65437cd6, 0x9727, 0x488c, 0xa9, 0xc5, 0x92, 0x42, 0x43, 0xf5, 0x5b, 0xa0, IData_collection > mi::IData_collection mi::base::Interface_declare< 0x1bb2be0f, 0x0dc6, 0x44b2, 0x93, 0xb9, 0xd1, 0xba, 0x6a, 0x31, 0x88, 0x1c, IData > mi::IData mi::base::Interface_declare< 0x2e5f84bc, 0x783a, 0x4551, 0x9f, 0xca, 0x72, 0x2f, 0xb8, 0x38, 0xc4, 0x7c > mi::base::IInterface mi::base::Interface_declare< 0x107953d0, 0x70a0, 0x48f5, 0xb1, 0x17, 0x68, 0x8e, 0x7b, 0xf8, 0x85, 0xa1, ICompound > mi::base::Interface_declare< 0x10a52754, 0xa1c7, 0x454c, 0x8a, 0x0b, 0x56, 0xd4, 0xd4, 0xdc, 0x62, 0x18, ICompound > mi::base::Interface_declare< 0x1189e839, 0x6d86, 0x4bac, 0xbc, 0x72, 0xb0, 0xc0, 0x2d, 0xa9, 0x3c, 0x6c, ICompound > mi::base::Interface_declare< 0x127293dc, 0x1fad, 0x4df5, 0x94, 0x38, 0xe3, 0x48, 0xda, 0x7b, 0x8c, 0xf6, ICompound > mi::base::Interface_declare< 0x237695a3, 0x8e73, 0x4d6b, 0x83, 0xd5, 0xd0, 0xfe, 0x46, 0x04, 0x35, 0x8b, ICompound > mi::base::Interface_declare< 0x255bdb3b, 0xa22d, 0x4079, 0xb2, 0xcc, 0xb3, 0x4d, 0x4d, 0xe1, 0xeb, 0x0c, ICompound > mi::base::Interface_declare< 0x2ae980c6, 0xab7c, 0x4d76, 0x9d, 0xdf, 0xa2, 0xc8, 0x0e, 0x01, 0xa5, 0xf9, ICompound > mi::base::Interface_declare< 0x2c32de8d, 0xa2dd, 0x4236, 0x80, 0xef, 0x95, 0xea, 0xee, 0xc5, 0xa8, 0x4a, ICompound > mi::base::Interface_declare< 0x3c778aa4, 0x0641, 0x4bea, 0xb2, 0x82, 0xe4, 0xae, 0x8f, 0xc0, 0x98, 0x16, ICompound > mi::base::Interface_declare< 0x3e7dace9, 0x0295, 0x42db, 0x82, 0x17, 0x95, 0x62, 0x24, 0x6d, 0x09, 0xf9, ICompound > mi::base::Interface_declare< 0x3ee8938e, 0x690f, 0x4932, 0x8a, 0xad, 0x54, 0x41, 0x46, 0xc2, 0x10, 0x5c, ICompound > mi::base::Interface_declare< 0x3f559cde, 0xd898, 0x493a, 0x92, 0x5d, 0x52, 0x9e, 0xfa, 0x1f, 0xf7, 0xa9, ICompound > mi::base::Interface_declare< 0x44ba66a0, 0x38ec, 0x4512, 0x90, 0x85, 0x6a, 0x1f, 0xdb, 0xdc, 0x81, 0x2b, ICompound > mi::base::Interface_declare< 0x452bc5ae, 0x1acf, 0x4e0b, 0x99, 0x6e, 0x93, 0xc6, 0x4f, 0xab, 0xc1, 0x5e, ICompound > mi::base::Interface_declare< 0x4bebd304, 0x311a, 0x402b, 0x99, 0xae, 0x6d, 0x51, 0x42, 0x2c, 0x98, 0xc4, ICompound > mi::base::Interface_declare< 0x525d7b84, 0x384d, 0x4a60, 0x9a, 0xf9, 0x9a, 0xa7, 0x33, 0xac, 0xb1, 0xdb, ICompound > mi::base::Interface_declare< 0x53d8e9cc, 0x7156, 0x4805, 0x8c, 0xad, 0x88, 0x22, 0xcc, 0x42, 0x17, 0xce, ICompound > mi::base::Interface_declare< 0x5acf22f8, 0x5834, 0x4608, 0x92, 0xc9, 0x91, 0x4e, 0x6b, 0x41, 0xf0, 0x06, ICompound > mi::base::Interface_declare< 0x5bd710b6, 0xdd62, 0x4915, 0x9c, 0x31, 0x28, 0x0c, 0x93, 0x46, 0x0d, 0x0b, ICompound > mi::base::Interface_declare< 0x5d106447, 0xd197, 0x48f9, 0x83, 0xd8, 0x43, 0x7d, 0x08, 0x66, 0x09, 0x35, ICompound > mi::base::Interface_declare< 0x6145389f, 0x9baa, 0x4d87, 0x8e, 0xf2, 0x69, 0x9d, 0x0b, 0xd5, 0xaf, 0x8c, ICompound > mi::base::Interface_declare< 0x61d853dc, 0x6ba4, 0x46e6, 0x97, 0xd4, 0xcd, 0xdb, 0x25, 0xf0, 0xc7, 0xf6, ICompound > mi::base::Interface_declare< 0x630a979d, 0xdc70, 0x442a, 0x94, 0xb3, 0x47, 0x0b, 0xbe, 0x92, 0x92, 0xc8, ICompound > mi::base::Interface_declare< 0x69c4af0e, 0xe70f, 0x4435, 0xbd, 0x5d, 0xcf, 0x56, 0xdf, 0xf1, 0x96, 0xff, ICompound > mi::base::Interface_declare< 0x75f80041, 0x08c0, 0x42c0, 0x90, 0x34, 0xf6, 0x80, 0x4b, 0x05, 0x96, 0xa6, ICompound > mi::base::Interface_declare< 0x766c0535, 0xdf09, 0x4b6e, 0xb8, 0x1c, 0x09, 0x1c, 0xa5, 0xa9, 0xb2, 0x67, ICompound > mi::base::Interface_declare< 0x7ae72374, 0x8953, 0x4a40, 0x88, 0x80, 0x0e, 0x8c, 0x97, 0x51, 0x61, 0x11, ICompound > mi::base::Interface_declare< 0x7c94c35a, 0x1831, 0x4ae2, 0xa9, 0x16, 0x68, 0xf0, 0x29, 0x4c, 0xfd, 0xc8, ICompound > mi::base::Interface_declare< 0x8023e460, 0x8c07, 0x4d22, 0x95, 0xc6, 0x70, 0xb5, 0xa8, 0x2e, 0x58, 0x4a, ICompound > mi::base::Interface_declare< 0x810cf1e9, 0x6559, 0x40d1, 0xbf, 0xfe, 0xa5, 0xda, 0x9b, 0x40, 0xf5, 0xaf, ICompound > mi::base::Interface_declare< 0x88360736, 0x9177, 0x4f36, 0x80, 0x72, 0x7c, 0x12, 0x87, 0xf5, 0xbc, 0xab, ICompound > mi::base::Interface_declare< 0x896365dd, 0x4f16, 0x46e9, 0xac, 0xff, 0xb6, 0xe6, 0x03, 0x26, 0x77, 0xb7, ICompound > mi::base::Interface_declare< 0x896a5521, 0x3faa, 0x4ab3, 0xae, 0x18, 0xc8, 0x67, 0x23, 0xb0, 0x97, 0xc0, ICompound > mi::base::Interface_declare< 0x8c7cdbd2, 0xe910, 0x4805, 0x9e, 0x8c, 0x0a, 0xe7, 0x42, 0xad, 0x76, 0xca, ICompound > mi::base::Interface_declare< 0x8cc34e01, 0xa5d7, 0x48c2, 0x89, 0xeb, 0x34, 0x38, 0xf9, 0x22, 0xd8, 0x14, ICompound > mi::base::Interface_declare< 0x94cafc84, 0x28ae, 0x4d34, 0x90, 0x74, 0xdb, 0x6b, 0xf5, 0xc1, 0xe9, 0x89, ICompound > mi::base::Interface_declare< 0xa21d9b0f, 0x1247, 0x426f, 0xa3, 0x20, 0xd7, 0x36, 0x6d, 0xfc, 0x28, 0xc9, ICompound > mi::base::Interface_declare< 0xa87fd0c9, 0x3ada, 0x4c0b, 0xb3, 0x71, 0x36, 0x9c, 0xd7, 0x4a, 0x1f, 0xcf, ICompound > mi::base::Interface_declare< 0xac9458cf, 0x2502, 0x4279, 0x91, 0x83, 0xa6, 0x65, 0xe7, 0x8e, 0xcb, 0xca, ICompound > mi::base::Interface_declare< 0xad5cc27f, 0xec85, 0x4499, 0x89, 0x12, 0xcd, 0x6b, 0x0f, 0xf7, 0x22, 0x5f, ICompound > mi::base::Interface_declare< 0xadcfb745, 0xf396, 0x40bf, 0xab, 0x8b, 0x09, 0xaf, 0xb5, 0xe8, 0xc5, 0xd7, ICompound > mi::base::Interface_declare< 0xb2f0b878, 0xbb43, 0x4677, 0x87, 0x30, 0xad, 0x60, 0xe6, 0x17, 0x04, 0x9f, ICompound > mi::base::Interface_declare< 0xbc8a491c, 0x2c05, 0x4b03, 0x91, 0x5b, 0x84, 0x4d, 0x36, 0xe5, 0x1a, 0xe8, ICompound > mi::base::Interface_declare< 0xc35dd2a2, 0x11d1, 0x420e, 0x8b, 0xea, 0xbf, 0x4e, 0x82, 0x19, 0xc1, 0x0c, ICompound > mi::base::Interface_declare< 0xc379de7e, 0x4624, 0x41a5, 0xb5, 0x3c, 0x92, 0xf4, 0x8a, 0xdc, 0xfa, 0xa6, ICompound > mi::base::Interface_declare< 0xc5b8c13e, 0x2fb0, 0x48a5, 0x8c, 0x79, 0x04, 0xa4, 0x31, 0x27, 0x74, 0x73, ICompound > mi::base::Interface_declare< 0xc7f2f4ed, 0x3f90, 0x4564, 0xa5, 0x42, 0xbd, 0x36, 0x01, 0xa6, 0x77, 0x0c, ICompound > mi::base::Interface_declare< 0xc845c505, 0xc345, 0x4bd0, 0x81, 0x50, 0x6b, 0x18, 0xd7, 0xc8, 0x3f, 0xa9, ICompound > mi::base::Interface_declare< 0xcaeac729, 0xea48, 0x4c9a, 0xa0, 0xda, 0xda, 0x6a, 0x36, 0xbe, 0x72, 0x64, ICompound > mi::base::Interface_declare< 0xd17f3d5a, 0x549f, 0x4823, 0x84, 0x70, 0xa5, 0x2d, 0xc4, 0x5d, 0xf4, 0xab, ICompound > mi::base::Interface_declare< 0xd1e53e9d, 0xcf1b, 0x438e, 0xa8, 0xcb, 0x87, 0x7c, 0x03, 0xa7, 0x66, 0xa3, ICompound > mi::base::Interface_declare< 0xd1ff55d2, 0x6c7b, 0x4421, 0xa1, 0x48, 0x82, 0x7d, 0x01, 0xce, 0xf5, 0x14, ICompound > mi::base::Interface_declare< 0xd202f3db, 0x4d0a, 0x4cd0, 0xa6, 0x88, 0xf2, 0xf2, 0x3e, 0xe3, 0x62, 0x4d, ICompound > mi::base::Interface_declare< 0xd571c16c, 0xb441, 0x4437, 0xaa, 0xfc, 0xe5, 0x1a, 0x2a, 0xbe, 0x35, 0xfe, ICompound > mi::base::Interface_declare< 0xd6c71e4f, 0xeb0e, 0x4efd, 0xb7, 0xfe, 0x48, 0x41, 0x2f, 0x65, 0x7c, 0x1a, ICompound > mi::base::Interface_declare< 0xd74ae71c, 0x13ca, 0x49b3, 0xa4, 0xdc, 0xb8, 0x4b, 0x33, 0x3e, 0x79, 0x63, ICompound > mi::base::Interface_declare< 0xdb03b6f9, 0x2e87, 0x4afa, 0x98, 0xc4, 0x00, 0xaa, 0xc3, 0x40, 0xc7, 0xc5, ICompound > mi::base::Interface_declare< 0xde9ff829, 0x045c, 0x427d, 0xb2, 0x27, 0x1c, 0xb9, 0x1e, 0x6c, 0x81, 0x5a, ICompound > mi::base::Interface_declare< 0xe554261e, 0x1aed, 0x44de, 0x88, 0xb7, 0x02, 0x26, 0x97, 0xde, 0xf6, 0x6b, ICompound > mi::base::Interface_declare< 0xe5ad29e9, 0x90d2, 0x4946, 0xbe, 0xe6, 0x99, 0x7d, 0x41, 0xe2, 0x4d, 0x45, ICompound > mi::base::Interface_declare< 0xe69208dc, 0x34a5, 0x4740, 0x99, 0x85, 0xad, 0x7f, 0x0a, 0xc3, 0xb5, 0xe5, ICompound > mi::base::Interface_declare< 0xe694e96d, 0x8920, 0x4057, 0xb1, 0xf0, 0xb1, 0x92, 0xa0, 0x92, 0xb8, 0x19, ICompound > mi::base::Interface_declare< 0xea2e5b27, 0x85ac, 0x46a6, 0xb3, 0xda, 0x76, 0x84, 0x08, 0xb0, 0x28, 0x3d, ICompound > mi::base::Interface_declare< 0xeea73757, 0x48e6, 0x4168, 0x9c, 0x97, 0x81, 0x82, 0x52, 0x1f, 0x79, 0xe0, ICompound >

Public Member Functions

virtual Size get_number_of_rows () const =0
 Returns the number of rows of the represented matrix or vector. More...
 
virtual Size get_number_of_columns () const =0
 Returns the number of columns of the represented matrix. More...
 
virtual Size get_length () const =0
 Returns the total number of elements. More...
 
virtual const char * get_element_type_name () const =0
 Returns the type name of elements of the compound. More...
 
virtual bool get_value (Size row, Size column, bool &value) const =0
 Accesses the (row, column)-th element. More...
 
virtual bool get_value (Size row, Size column, Sint32 &value) const =0
 Accesses the (row, column)-th element. More...
 
virtual bool get_value (Size row, Size column, Uint32 &value) const =0
 Accesses the (row, column)-th element. More...
 
virtual bool get_value (Size row, Size column, Float32 &value) const =0
 Accesses the (row, column)-th element. More...
 
virtual bool get_value (Size row, Size column, Float64 &value) const =0
 Accesses the (row, column)-th element. More...
 
template<class T >
get_value (Size row, Size column) const
 Accesses the (row, column)-th element. More...
 
virtual bool set_value (Size row, Size column, bool value)=0
 Sets the (row, column)-th element to value. More...
 
virtual bool set_value (Size row, Size column, Sint32 value)=0
 Sets the (row, column)-th element to value. More...
 
virtual bool set_value (Size row, Size column, Uint32 value)=0
 Sets the (row, column)-th element to value. More...
 
virtual bool set_value (Size row, Size column, Float32 value)=0
 Sets the (row, column)-th element to value. More...
 
virtual bool set_value (Size row, Size column, Float64 value)=0
 Sets the (row, column)-th element to value. More...
 
virtual void get_values (bool *values) const =0
 Accesses the elements of the compound. More...
 
virtual void get_values (Sint32 *values) const =0
 Accesses the elements of the compound. More...
 
virtual void get_values (Uint32 *values) const =0
 Accesses the elements of the compound. More...
 
virtual void get_values (Float32 *values) const =0
 Accesses the elements of the compound. More...
 
virtual void get_values (Float64 *values) const =0
 Accesses the elements of the compound. More...
 
virtual void set_values (const bool *values)=0
 Sets the elements of the compound. More...
 
virtual void set_values (const Sint32 *values)=0
 Sets the elements of the compound. More...
 
virtual void set_values (const Uint32 *values)=0
 Sets the elements of the compound. More...
 
virtual void set_values (const Float32 *values)=0
 Sets the elements of the compound. More...
 
virtual void set_values (const Float64 *values)=0
 Sets the elements of the compound. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x65437cd6, 0x9727, 0x488c, 0xa9, 0xc5, 0x92, 0x42, 0x43, 0xf5, 0x5b, 0xa0, IData_collection >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IData_collection
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x65437cd6, 0x9727, 0x488c, 0xa9, 0xc5, 0x92, 0x42, 0x43, 0xf5, 0x5b, 0xa0, IData_collection >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

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

It can be used to represent vectors and matrices by an interface derived from mi::base::IInterface. In contrast to specialized interfaces for particular vector and matrix types it has a generic interface for vectors and matrices of any size and any primitive type as element type. See Types for description of the type system.

This interface treats vectors as column vectors, i.e., as matrices with a single column. Colors are treated as vectors of length 3 or 4, spectrums as vectors of length 3, and bounding boxes as matrices of 2 rows and 3 columns.

In case of vectors and matrices the type name of a compound is the type name of the element followed by "<", the size of the compound, and finally ">". In case of vectors, the size is specified by a single positive integer. In case of matrices the size is specified as two positive integers separated by a comma. The first and second integer indicate the number of rows and columns, respectively. Examples of valid type names are "Sint32<3>" or "Float32<2,2>". The type names of the two color types are "Color" and "Color3", the type name of spectrums is "Spectrum", and the type name of bounding boxes is "Bbox3".

The following keys are supported with the methods of mi::IData_collection are the following: vectors support the keys "x", "y", "z", and "w" (or subsets thereof, depending on the dimension). Matrices support the keys "xx", "xy", "xz", "xw", "yx", "yy", "yz", "yw", "zx", "zy", "zz", "zw", "wx", "wy", "wz", and "ww" (or subsets thereof, depending on the dimension). Colors support the keys "r", "g", "b", and "a" (the type "Color3" lacks the "a" key). Spectrums support the keys "0", "1", and "2". Finally, bounding boxes support the keys "min_x", "min_y", "min_z", "max_x", "max_y", and "max_z".

Note
Currently the element type is restricted to be either bool, mi::Sint32, mi::Float32, or mi::Float64. If used as an attribute, matrices are restricted to mi::Float32 as element type with the exception of 4 x 4 matrices of elements of type mi::Float64.

Member Function Documentation

virtual const char* mi::ICompound::get_element_type_name ( ) const
pure virtual

Returns the type name of elements of the compound.

virtual Size mi::ICompound::get_length ( ) const
pure virtual

Returns the total number of elements.

This value is the product of get_number_of_rows() and get_number_of_columns().

Implements mi::IData_collection.

virtual Size mi::ICompound::get_number_of_columns ( ) const
pure virtual

Returns the number of columns of the represented matrix.

Always returns 1 in case of vectors.

virtual Size mi::ICompound::get_number_of_rows ( ) const
pure virtual

Returns the number of rows of the represented matrix or vector.

virtual bool mi::ICompound::get_value ( Size  row,
Size  column,
bool &  value 
) const
pure virtual

Accesses the (row, column)-th element.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::get_value ( Size  row,
Size  column,
Sint32 value 
) const
pure virtual

Accesses the (row, column)-th element.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::get_value ( Size  row,
Size  column,
Uint32 value 
) const
pure virtual

Accesses the (row, column)-th element.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::get_value ( Size  row,
Size  column,
Float32 value 
) const
pure virtual

Accesses the (row, column)-th element.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::get_value ( Size  row,
Size  column,
Float64 value 
) const
pure virtual

Accesses the (row, column)-th element.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
template<class T >
T mi::ICompound::get_value ( Size  row,
Size  column 
) const
inline

Accesses the (row, column)-th element.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual void mi::ICompound::get_values ( bool *  values) const
pure virtual

Accesses the elements of the compound.

Parameters
valuesThe values of the compound elements are written to this buffer. The size of the buffer has to be at least get_length() times sizeof(bool).
virtual void mi::ICompound::get_values ( Sint32 values) const
pure virtual

Accesses the elements of the compound.

Parameters
valuesThe values of the compound elements are written to this buffer. The size of the buffer has to be at least get_length() times sizeof(Sint32).
virtual void mi::ICompound::get_values ( Uint32 values) const
pure virtual

Accesses the elements of the compound.

Parameters
valuesThe values of the compound elements are written to this buffer. The size of the buffer has to be at least get_length() times sizeof(Uint32).
virtual void mi::ICompound::get_values ( Float32 values) const
pure virtual

Accesses the elements of the compound.

Parameters
valuesThe values of the compound elements are written to this buffer. The size of the buffer has to be at least get_length() times sizeof(Float32).
virtual void mi::ICompound::get_values ( Float64 values) const
pure virtual

Accesses the elements of the compound.

Parameters
valuesThe values of the compound elements are written to this buffer. The size of the buffer has to be at least get_length() times sizeof(Float64).
virtual bool mi::ICompound::set_value ( Size  row,
Size  column,
bool  value 
)
pure virtual

Sets the (row, column)-th element to value.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::set_value ( Size  row,
Size  column,
Sint32  value 
)
pure virtual

Sets the (row, column)-th element to value.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::set_value ( Size  row,
Size  column,
Uint32  value 
)
pure virtual

Sets the (row, column)-th element to value.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::set_value ( Size  row,
Size  column,
Float32  value 
)
pure virtual

Sets the (row, column)-th element to value.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual bool mi::ICompound::set_value ( Size  row,
Size  column,
Float64  value 
)
pure virtual

Sets the (row, column)-th element to value.

Precondition
row < get_number_of_rows(), column < get_number_of_columns()
virtual void mi::ICompound::set_values ( const bool *  values)
pure virtual

Sets the elements of the compound.

Parameters
valuesThe new values of the compound elements are read to this buffer. The size of the buffer has to be at least get_length() times sizeof(bool).
virtual void mi::ICompound::set_values ( const Sint32 values)
pure virtual

Sets the elements of the compound.

Parameters
valuesThe new values of the compound elements are read to this buffer. The size of the buffer has to be at least get_length() times sizeof(Sint32).
virtual void mi::ICompound::set_values ( const Uint32 values)
pure virtual

Sets the elements of the compound.

Parameters
valuesThe new values of the compound elements are read to this buffer. The size of the buffer has to be at least get_length() times sizeof(Uint32).
virtual void mi::ICompound::set_values ( const Float32 values)
pure virtual

Sets the elements of the compound.

Parameters
valuesThe new values of the compound elements are read to this buffer. The size of the buffer has to be at least get_length() times sizeof(Float32).
virtual void mi::ICompound::set_values ( const Float64 values)
pure virtual

Sets the elements of the compound.

Parameters
valuesThe new values of the compound elements are read to this buffer. The size of the buffer has to be at least get_length() times sizeof(Float64).