Converts between RWGenMat types with different datatypes.
More...
#include <rw/math/genmat.h>
template<class From, class To>
struct RWConvertGenMat< From, To >
Class RWConvertGenMat converts between RWGenMat types with different datatypes. It assumes that there is a conversion operator from From to To.
- Synopsis
template <class From, class To>
- Example
#include <rw/math/genmat.h>
int main()
{
s = sin(s);
}
template<class From, class To>
Constructs a new matrix of type RWGenMat that can be used anywhere as a type RWGenMat. Note that a temporary matrix is created every time this constructor is invoked, but the conversion operator below can be used repeatedly without creating additional temporary matrices.
template<class From, class To>
Automatic conversion operator that enables class RWConvertGenMat to be used as an RWGenMat. While the actual conversion takes place in the constructor, this operator provides a reference to that converted matrix.