This interface represents compounds, i.e., vectors, matrices, colors, spectrums, and bounding boxes.
More...
|
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 > |
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...
|
|
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.