FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
math::VecTraits< VEC > Struct Template Reference

Type traits on vector types. More...

#include <mathtools/vec_traits.h>

Detailed Description

template<typename VEC>
struct math::VecTraits< VEC >

Type traits on vector types.

Example:

struct MyVector2D
{
double x;
double y;
};
namespace math {
template<> struct VecTraits<MyVector2D>
{
typedef PointerVecAccessTag AccessCategory;
typedef double CoordType;
enum { Arity = 2 };
};
template<> struct VecAccess<MyVector2D>
{
static const double* pointer(const MyVector2D& vec)
{ return &vec.x; }
};
}

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