52 #ifndef OPENMESH_VECTORCAST_HH
53 #define OPENMESH_VECTORCAST_HH
59 #include <OpenMesh/Core/System/config.h>
60 #include <OpenMesh/Core/Utils/vector_traits.hh>
61 #include <OpenMesh/Core/Utils/GenProg.hh>
62 #include <OpenMesh/Core/Geometry/VectorT.hh>
80 template <
typename src_t,
typename dst_t,
int n>
81 inline void vector_cast(
const src_t &_src, dst_t &_dst, GenProg::Int2Type<n> )
88 template <
typename src_t,
typename dst_t>
89 inline void vector_cast(
const src_t & , dst_t & , GenProg::Int2Type<0> )
93 template <
typename src_t,
typename dst_t,
int n>
94 inline void vector_copy(
const src_t &_src, dst_t &_dst, GenProg::Int2Type<n> )
98 _dst[n-1] = _src[n-1];
101 template <
typename src_t,
typename dst_t>
102 inline void vector_copy(
const src_t & , dst_t & , GenProg::Int2Type<0> )
109 #ifndef DOXY_IGNORE_THIS
111 template <
typename dst_t,
typename src_t>
114 typedef dst_t return_type;
116 inline static return_type cast(
const src_t& _src)
124 #if !defined(OM_CC_MSVC)
125 template <
typename dst_t>
126 struct vector_caster<dst_t,dst_t>
128 typedef const dst_t& return_type;
130 inline static return_type cast(
const dst_t& _src)
142 template <
typename dst_t,
typename src_t>
144 typename vector_caster<dst_t, src_t>::return_type
147 return vector_caster<dst_t, src_t>::cast(_src);
157 #endif // OPENMESH_MESHREADER_HH defined