Cortex  10.0.0-a4
Classes | Namespaces | Functions
MatrixOps.h File Reference
#include "IECore/MatrixTraits.h"
#include "IECore/MatrixOps.inl"

Go to the source code of this file.

Classes

struct  IECore::MatConvert< T, S >
 

Namespaces

 IECore
 This namespace contains all components of the core library.
 

Functions

template<typename T >
void IECore::matSet (T &m, unsigned int i, unsigned int j, typename MatrixTraits< T >::BaseType x)
 Sets the specified component of m to the value x.
 
template<typename T >
void IECore::matSetAll (T &m, typename MatrixTraits< T >::BaseType x)
 Sets all components of m to the value x.
 
template<typename T >
MatrixTraits< T >::BaseType IECore::matGet (const T &m, unsigned int i, unsigned int j)
 Returns the value of the specified component of v.
 
template<typename T , typename S >
IECore::matConvert (const T &m)
 Converts from one matrix type to another.
 
template<typename T , typename S >
void IECore::matConvert (const T &m1, S &m2)
 Converts from one matrix type to another.
 

Detailed Description

Defines useful functions for dealing with any types which define an appropriate MatrixTraits struct. Although it's much prettier to use the built in operators for a typical matrix implementation, it's not particularly practical in much templated code as different vector types define different syntax or semantics for such operations. These functions give less intuitive syntax but are compatible with any classes for which a valid MatrixTraits specialisation exists.