IECore::VectorTraits< T > Struct Template Reference

#include <VectorTraits.h>

List of all members.

Public Types

typedef T::BaseType BaseType
 The type of the components of the vector.

Static Public Member Functions

static unsigned int dimensions ()
static BaseType get (const T &v, unsigned int i)
static void set (T &v, unsigned int i, BaseType x)


Detailed Description

template<typename T>
struct IECore::VectorTraits< T >

The VectorTraits struct provides a means of using different vector classes within templated code. It provides the basis for the functions in VectorOps.h, which provide common vector operations using the underlying VectorTraits classes. The default implementation works for the ImathVec types out of the box. For any other types you may need to specialise it.

Member Typedef Documentation

template<typename T>
typedef T::BaseType IECore::VectorTraits< T >::BaseType

The type of the components of the vector.


Member Function Documentation

template<typename T>
static unsigned int IECore::VectorTraits< T >::dimensions (  )  [inline, static]

template<typename T>
static BaseType IECore::VectorTraits< T >::get ( const T &  v,
unsigned int  i 
) [inline, static]

template<typename T>
static void IECore::VectorTraits< T >::set ( T &  v,
unsigned int  i,
BaseType  x 
) [inline, static]


The documentation for this struct was generated from the following file:

Generated on Mon Jan 24 11:13:28 2011 for Cortex by doxygen 1.5.8