#include <ShMatrix.hpp>
Collaboration diagram for SH::ShMatrix< Rows, Cols, Binding, T >:
Public Member Functions | |
ShMatrix () | |
Identity constructor. | |
ShMatrix (const ShMatrix< Rows, Cols, Binding, T > &other) | |
Copy constructor. | |
template<ShBindingType Binding2> | ShMatrix (const ShMatrix< Rows, Cols, Binding2, T > &other) |
Copy constructor. | |
ShMatrix & | operator= (const ShMatrix< Rows, Cols, Binding, T > &other) |
Assignment. | |
template<ShBindingType Binding2> ShMatrix & | operator= (const ShMatrix< Rows, Cols, Binding2, T > &other) |
Assignment. | |
ShAttrib< Cols, Binding, T > & | operator[] (int i) |
Attribute row access. | |
const ShAttrib< Cols, Binding, T > & | operator[] (int i) const |
Attribute row access. | |
template<ShBindingType Binding2> ShMatrix & | operator+= (const ShMatrix< Rows, Cols, Binding2, T > &other) |
Modifying componentwise addition. | |
template<ShBindingType Binding2> ShMatrix & | operator-= (const ShMatrix< Rows, Cols, Binding2, T > &other) |
Modifying componentwise subtraction. | |
template<ShBindingType Binding2> ShMatrix & | operator/= (const ShMatrix< Rows, Cols, Binding2, T > &other) |
Modifying componentwise division. | |
ShMatrix< Rows-1, Cols-1, SH_TEMP, T > | subMatrix (int, int) const |
Obtain a submatrix of this matrix. | |
void | setTranslation (const ShGeneric< Rows-1, T > &trans) |
void | setScaling (const ShGeneric< Rows-1, T > &scale) |
ShMatrix & | operator *= (const ShGeneric< 1, T > &a) |
Modifying scalar multiplicatoin. | |
ShMatrix & | operator/= (const ShGeneric< 1, T > &a) |
Modifying scalar division. | |
Swizzling | |
Retrieve some set of rows from this matrix.
These must be swizzled again to operate on them. | |
ShMatrixRows< Rows, Cols, T > | operator() () const |
Identity swizzle. | |
ShMatrixRows< 1, Cols, T > | operator() (int) const |
ShMatrixRows< 2, Cols, T > | operator() (int, int) const |
ShMatrixRows< 3, Cols, T > | operator() (int, int, int) const |
ShMatrixRows< 4, Cols, T > | operator() (int, int, int, int) const |
Metadata | |
This data is useful for various things, including asset management. | |
void | name (const std::string &name) |
Set this matrix's name. | |
std::string | name () const |
Get this matrix's name. | |
void | range (T low, T high) |
Set a range of values for this matrix. | |
void | internal (bool setting) |
If this is true, this matrix should not be able to be set by e.g. |
A matrix is a representation of a linear operator. In Sh, this class represents SMALL matrices that will fit in registers. For large amounts of data, use an ShArray.
Definition at line 49 of file ShMatrix.hpp.
|
Identity constructor. Constructs an identity matrix. For non-square matrices, the largest square upper-left submatrix possible is made an identity matrix, with the rest left zero. Definition at line 39 of file ShMatrixImpl.hpp. |
|
Copy constructor. Construct a matrix with the same contents as the given matrix. Definition at line 46 of file ShMatrixImpl.hpp. |
|
Copy constructor. Construct a matrix with the same contents as the given matrix. Definition at line 54 of file ShMatrixImpl.hpp. |
|
If this is true, this matrix should not be able to be set by e.g. a user in a UI. For example the model-view matrix should probably have this set to true. This is false by default. Definition at line 368 of file ShMatrixImpl.hpp. |
|
Set this matrix's name. If set to the empty string, defaults to the type and id of the variable. Definition at line 345 of file ShMatrixImpl.hpp. |
|
Modifying scalar multiplicatoin. Multiply the given scalar attribute with each component of this matrix. Definition at line 129 of file ShMatrixImpl.hpp. |
|
Modifying componentwise addition. Add each entry in the given matrix to each entry in this matrix matching its row and column index. Definition at line 100 of file ShMatrixImpl.hpp. |
|
Modifying componentwise subtraction. Subtract each entry in the given matrix from each entry in this matrix matching its row and column index. Definition at line 110 of file ShMatrixImpl.hpp. |
|
Modifying scalar division. Divide each component of this matrix by the given attribute. Definition at line 138 of file ShMatrixImpl.hpp. |
|
Modifying componentwise division. Divide each entry in this matrix by the entry in the given matrix matching its row and column index. Definition at line 120 of file ShMatrixImpl.hpp. |
|
Assignment. Replace each entry in this matrix with the corresponding entry of the given matrix. Definition at line 78 of file ShMatrixImpl.hpp. |
|
Assignment. Replace each entry in this matrix with the corresponding entry of the given matrix. Definition at line 68 of file ShMatrixImpl.hpp. |
|
Attribute row access. Return a reference to the given row as an ShAttrib. Definition at line 92 of file ShMatrixImpl.hpp. |
|
Attribute row access. Return a reference to the given row as an ShAttrib. Definition at line 86 of file ShMatrixImpl.hpp. |
|
Obtain a submatrix of this matrix. Return a copy of this matrix not containing the given row and column. Definition at line 195 of file ShMatrixImpl.hpp. |